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

git-admin at x2go.org git-admin at x2go.org
Wed Jan 18 12:26:20 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 e440f47b099aac2bddcfa5e47d2e08b2e46005af
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 f92e7ba..81a770d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -500,6 +500,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 d3b4a5b..35febad 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -10028,7 +10028,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();
     }
 
@@ -10520,7 +10519,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))) {
@@ -10588,6 +10586,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