[X2Go-Commits] [x2goclient] 07/07: src/onmainwindow.cpp: actually use key_type parameter in startSshd () and make selection more generic.

git-admin at x2go.org git-admin at x2go.org
Wed Oct 26 19:26:28 CEST 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 205fb266a64d66b66fd027152a1c2639cc310a7e
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Wed Oct 26 19:25:33 2016 +0200

    src/onmainwindow.cpp: actually use key_type parameter in startSshd () and make selection more generic.
---
 debian/changelog     |    2 ++
 src/onmainwindow.cpp |    8 ++++----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 5189adf..fb2edd7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -446,6 +446,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium
       createKeyBundle ().
     - src/onmainwindow.cpp: add and use key_types parameter to
       startWinServers ().
+    - src/onmainwindow.cpp: actually use key_type parameter in startSshd ()
+      and make selection more generic.
 
   [ Bernard Cafarelli ]
   * New upstream version (4.0.5.3):
diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp
index 176db99..0ff7d31 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -10469,6 +10469,8 @@ bool ONMainWindow::startSshd(ONMainWindow::key_types key_type)
         return false;
     }
 
+    const QString stringified_key_type = key_type_to_string (key_type);
+
     /* Don't start sshd, if it's already running. */
 #ifdef Q_OS_WIN
     if (winSshdStarted)
@@ -10492,8 +10494,7 @@ bool ONMainWindow::startSshd(ONMainWindow::key_types key_type)
     std::string clientdir=wapiShortFileName ( appDir ).toStdString();
     std::stringstream strm;
     std::string config="\""+cygwinPath(etcDir+"/sshd_config").toStdString()+"\"";
-    /* FIXME: make this generic! */
-    std::string key="\""+cygwinPath(etcDir+"/ssh_host_rsa_key").toStdString()+"\"";
+    std::string key="\""+cygwinPath(etcDir+"/ssh_host_" + stringified_key_type + "_key").toStdString()+"\"";
 
     // generate a unique sshLog filepath, and create its directory
     if (debugging)
@@ -10583,9 +10584,8 @@ bool ONMainWindow::startSshd(ONMainWindow::key_types key_type)
 #endif /* !(defined (Q_OS_UNIX)) */
 
     QStringList arguments;
-    /* FIXME: make key selection more generic! */
     arguments<<"-f"<<etcDir +"/sshd_config"<< "-h" <<
-             etcDir+"/ssh_host_rsa_key"<<"-D"<<"-p"<<clientSshPort;
+             etcDir+"/ssh_host_" + stringified_key_type + "_key"<<"-D"<<"-p"<<clientSshPort;
 
     sshd->start (binary, arguments);
 

--
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