[X2Go-Commits] [x2goclient] 250/280: 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 Jan 18 12:26:14 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 8c2bb96157572ba2751430989ecb0a22fcc9ffc6
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 3f85fed..9354f5c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -472,6 +472,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 d1e4c93..7de4eb0 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -10505,6 +10505,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)
@@ -10528,8 +10530,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)
@@ -10619,9 +10620,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