[X2Go-Commits] [x2goclient] 262/267: src/onmainwindow.cpp: move generateEtcFiles () call to startSshd ().

git-admin at x2go.org git-admin at x2go.org
Sat Dec 10 13:36:32 CET 2016


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch bugfix/osx
in repository x2goclient.

commit 7d018c20fb7146a2b20cb721f14547adc71c8a10
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Fri Dec 9 16:51:47 2016 +0100

    src/onmainwindow.cpp: move generateEtcFiles () call to startSshd ().
    
    We must make sure that the sshd_config file exists and is up-to-date, so
    let's always do it right before starting the sshd binary.
---
 debian/changelog     |    3 +++
 src/onmainwindow.cpp |    8 ++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index fa38c4d..f1843a8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -478,6 +478,9 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium
     - src/pulsemanager.cpp: fix PA binary searching logic. We don't want to
       unconditionally set system_pulse_ to true if we found a binary... it
       might as well be the bundled one...
+    - src/onmainwindow.cpp: move generateEtcFiles () call to startSshd (). We
+      must make sure that the sshd_config file exists and is up-to-date, so
+      let's always do it right before starting the sshd binary.
 
   [ Bernard Cafarelli ]
   * New upstream version (4.0.5.3):
diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp
index 44ad6f3..acf51bd 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -9994,7 +9994,6 @@ void ONMainWindow::startWinServers(ONMainWindow::key_types key_type)
         dr.mkpath ( etcDir );
         UNUSED (generateKey (key_type, true));
         sshStarter->set_ssh_key_type (key_type);
-        generateEtcFiles();
         sshStarter->start();
     }
 
@@ -10486,7 +10485,6 @@ QString ONMainWindow::createKeyBundle (key_types key_type) {
 #ifdef Q_OS_UNIX
     x2goDebug << "Creating a new one.";
     QString tmp_file_name (generateKey (key_type, true));
-    generateEtcFiles ();
 
     rsa.setFileName (tmp_file_name + ".pub");
     if (!(rsa.open (QIODevice::ReadOnly | QIODevice::Text))) {
@@ -10554,6 +10552,12 @@ bool ONMainWindow::startSshd(ONMainWindow::key_types key_type)
         }
     }
 
+    /*
+     * Pro-actively (re-)create sshd_config file, we'll need it for sshd
+     * and more importantly make sure that it's up-to-date.
+     */
+    generateEtcFiles ();
+
     clientSshPort = "7022";
     QString etcDir=homeDir+"/.x2go/etc";
     int port=clientSshPort.toInt();

--
Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git


More information about the x2go-commits mailing list