This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch bugfix/osx in repository x2goclient. from 6763467 macbuild.sh: save return value of parse_otool_output (). new e7537eb src/pulsemanager.cpp: fix typo in fetch_pulseaudio_version (). new 8142119 src/onmainwindow.h: add new enum for selecting SSH host key types. new 60960ba src/onmainwindow.h: rename ONMainWindow::generateHostDsaKey () to ONMainWindow::generateHostKey () and make key type selectible. Fixes: #1003. The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: debian/changelog | 9 ++++++ src/onmainwindow.cpp | 76 +++++++++++++++++++++++++++++++++++++------------- src/onmainwindow.h | 10 ++++++- src/pulsemanager.cpp | 2 +- 4 files changed, 75 insertions(+), 22 deletions(-) -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit e7537eb21de1802ac98fb4eea43ccd304cea96a1 Author: Mihai Moldovan <ionic@ionic.de> Date: Thu May 12 23:45:16 2016 +0200 src/pulsemanager.cpp: fix typo in fetch_pulseaudio_version (). Read standard output from temporary process, not our "main" server process (which at this point is not even started yet.) --- debian/changelog | 3 +++ src/pulsemanager.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index d94b3b6..1ac857d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -304,6 +304,9 @@ x2goclient (4.0.5.2-0x2go1) UNRELEASED; urgency=medium - macbuild.sh: don't error out while executing parse_otool_output (). - macbuild.sh: save return value of parse_otool_output (). Otherwise we'll fetch the return value of "set", which is not really what we need. + - src/pulsemanager.cpp: fix typo in fetch_pulseaudio_version (). Read + standard output from temporary process, not our "main" server process + (which at this point is not even started yet.) [ Mike DePaulo ] * New upstream release (4.0.5.2): diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp index ee6c63c..d19494d 100644 --- a/src/pulsemanager.cpp +++ b/src/pulsemanager.cpp @@ -241,7 +241,7 @@ void PulseManager::fetch_pulseaudio_version () { /* Wait until the process exited again. */ if (tmp_server.waitForFinished ()) { /* Read stdout and split it up on newlines. */ - QByteArray ba (pulse_server_->readAllStandardOutput ()); + QByteArray ba (tmp_server.readAllStandardOutput ()); QString stdout_data (ba.data ()); QStringList stdout_list (stdout_data.split ("\n")); -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 8142119ba3b6e39a16526afa8bda0eb45ac057dd Author: Mihai Moldovan <ionic@ionic.de> Date: Tue May 24 23:55:56 2016 +0200 src/onmainwindow.h: add new enum for selecting SSH host key types. --- debian/changelog | 1 + src/onmainwindow.h | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/debian/changelog b/debian/changelog index 1ac857d..e6ca030 100644 --- a/debian/changelog +++ b/debian/changelog @@ -307,6 +307,7 @@ x2goclient (4.0.5.2-0x2go1) UNRELEASED; urgency=medium - src/pulsemanager.cpp: fix typo in fetch_pulseaudio_version (). Read standard output from temporary process, not our "main" server process (which at this point is not even started yet.) + - src/onmainwindow.h: add new enum for selecting SSH host key types. [ Mike DePaulo ] * New upstream release (4.0.5.2): diff --git a/src/onmainwindow.h b/src/onmainwindow.h index 65f5e6f..cb71871 100644 --- a/src/onmainwindow.h +++ b/src/onmainwindow.h @@ -342,6 +342,14 @@ public: ESD }; + enum { + RSA_KEY_TYPE, + DSA_KEY_TYPE, + ECDSA_KEY_TYPE, + ED25519_KEY_TYPE, + UNKNOWN_KEY_TYPE + } key_types; + static bool debugging; static bool portable; -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 60960bacf28a794f30567119d20f16b619fbbd15 Author: Mihai Moldovan <ionic@ionic.de> Date: Wed May 25 00:56:14 2016 +0200 src/onmainwindow.h: rename ONMainWindow::generateHostDsaKey () to ONMainWindow::generateHostKey () and make key type selectible. Fixes: #1003. Host key type selection currently only works within the code. Replace calls to former ONMainWindow::generateHostDsaKey () with the generalized function and request an RSA-type key. --- debian/changelog | 5 ++++ src/onmainwindow.cpp | 76 +++++++++++++++++++++++++++++++++++++------------- src/onmainwindow.h | 6 ++-- 3 files changed, 64 insertions(+), 23 deletions(-) diff --git a/debian/changelog b/debian/changelog index e6ca030..68f8d9b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -308,6 +308,11 @@ x2goclient (4.0.5.2-0x2go1) UNRELEASED; urgency=medium standard output from temporary process, not our "main" server process (which at this point is not even started yet.) - src/onmainwindow.h: add new enum for selecting SSH host key types. + - src/onmainwindow.h: rename ONMainWindow::generateHostDsaKey () to + ONMainWindow::generateHostKey () and make key type selectible. Fixes: + #1003. Host key type selection currently only works within the code. Replace + calls to former ONMainWindow::generateHostDsaKey () with the generalized + function and request an RSA-type key. [ Mike DePaulo ] * New upstream release (4.0.5.2): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 084184d..f0ad66c 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -8094,14 +8094,14 @@ QString ONMainWindow::createRSAKey() if ( !rsa.open ( QIODevice::ReadOnly | QIODevice::Text ) ) { #if defined (Q_OS_LINUX) || defined (Q_OS_DARWIN) - generateHostDsaKey (); + generateHostKey (RSA_KEY_TYPE); generateEtcFiles (); if (!startSshd ()) { return (QString::null); } - rsa.setFileName ( homeDir+"/.x2go/etc/ssh_host_dsa_key.pub" ); + rsa.setFileName ( homeDir+"/.x2go/etc/ssh_host_rsa_key.pub" ); rsa.open ( QIODevice::ReadOnly | QIODevice::Text ); #else printSshDError_noHostPubKey(); @@ -10043,7 +10043,7 @@ void ONMainWindow::startWinServers() { dr.mkpath ( etcDir ); - generateHostDsaKey(); + generateHostKey(RSA_KEY_TYPE); generateEtcFiles(); sshStarter->start(); } @@ -10213,27 +10213,63 @@ void ONMainWindow::generateEtcFiles() x2goDebug<<etcDir +"/sshd_config created."; } -void ONMainWindow::generateHostDsaKey() -{ - QString etcDir=homeDir+"/.x2go/etc"; - QDir dr ( homeDir ); - dr.mkpath ( etcDir ); - if ( !QFile::exists ( etcDir+"/ssh_host_dsa_key" ) || - !QFile::exists ( etcDir+"/ssh_host_dsa_key.pub" ) ) - { - - x2goDebug<<"Generating host DSA key."; +void ONMainWindow::generateHostKey(ONMainWindow::key_types key_type) +{ + ONMainWindow::key_types sanitized_key_type = UNKNOWN_KEY_TYPE; + QString stringified_key_type = ""; + switch (key_type) { + case RSA_KEY_TYPE: + sanitized_key_type = key_type; + stringified_key_type = "rsa"; + break; + case DSA_KEY_TYPE: + sanitized_key_type = key_type; + stringified_key_type = "dsa"; + break; + case ECDSA_KEY_TYPE: + sanitized_key_type = key_type; + stringified_key_type = "ecdsa"; + break; + case ED25519_KEY_TYPE: + sanitized_key_type = key_type; + stringified_key_type = "ed25519"; + break; + default: + sanitized_key_type = UNKNOWN_KEY_TYPE; + stringified_key_type = "unknown"; + } + + if (sanitized_key_type == UNKNOWN_KEY_TYPE) { + QMessageBox::critical (this, tr ("Host key type selection error"), + tr ("Unknown host key selected.\nTerminating application.")); + close (); + } + + QString etcDir = homeDir + "/.x2go/etc/"; + QDir dr (homeDir); + dr.mkpath (etcDir); + QString private_key_file = etcDir + "/ssh_host_" + stringified_key_type + "_key"; + QString public_key_file = private_key_file + ".pub"; + + if ((!(QFile::exists (private_key_file))) || (!(QFile::exists (public_key_file)))) + { + x2goDebug << "Generating host key. Type: " << stringified_key_type; #ifdef Q_OS_WIN - QString fname=cygwinPath ( wapiShortFileName ( etcDir ) ) + - "/ssh_host_dsa_key"; -#else - QString fname=etcDir+"/ssh_host_dsa_key"; + private_key_file = cygwinPath (wapiShortFileName (etcDir)) + + "/ssh_host_" + stringified_key_type + "_key"; #endif + QStringList args; - args<<"-t"<<"dsa"<<"-N"<<""<<"-C"<< - "x2goclient DSA host key"<<"-f"<<fname; - QProcess::execute ( "ssh-keygen",args ); + args << "-t" + << stringified_key_type + << "-N" + << "" + << "-C" + << QString ("X2Go Client " + stringified_key_type + "host key") + << "-f" + << private_key_file; + QProcess::execute ("ssh-keygen", args); } } diff --git a/src/onmainwindow.h b/src/onmainwindow.h index cb71871..f17101f 100644 --- a/src/onmainwindow.h +++ b/src/onmainwindow.h @@ -342,13 +342,13 @@ public: ESD }; - enum { + enum key_types { RSA_KEY_TYPE, DSA_KEY_TYPE, ECDSA_KEY_TYPE, ED25519_KEY_TYPE, UNKNOWN_KEY_TYPE - } key_types; + }; static bool debugging; @@ -1204,7 +1204,7 @@ private: #endif void filterDesktops ( const QString& filter, bool strict=false ); - void generateHostDsaKey(); + void generateHostKey(key_types key_type); void generateEtcFiles(); QString u3DataPath(); void cleanPortable(); -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git