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

git-admin at x2go.org git-admin at x2go.org
Thu Jan 19 13:06:17 CET 2017


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

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

commit b3f3e293620126910af5e8c225c4a257faae5b2b
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 92217b7..066b093 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -501,6 +501,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 aabb879..0649586 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -10027,7 +10027,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();
     }
 
@@ -10519,7 +10518,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))) {
@@ -10587,6 +10585,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