This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 367533c991dd5c6eb03a1f5af60d6d952f6fe63b Author: Mihai Moldovan <ionic@ionic.de> Date: Fri Sep 23 03:12:43 2016 +0200 src/onmainwindow.cpp: add more error handling to generateKey () and fix up a broken error-handling section. --- debian/changelog | 2 ++ src/onmainwindow.cpp | 30 +++++++++++++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 51f1aa1..6b97ac8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -398,6 +398,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium value.) Change all locations referencing generateKey () to use the return value (if necessary) and remove dead code that was used to generate a user key manually previously. + - src/onmainwindow.cpp: add more error handling to generateKey () and fix + up a broken error-handling section. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 69a3e4b..3b9f7c8 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -10349,6 +10349,7 @@ QString ONMainWindow::generateKey(ONMainWindow::key_types key_type, bool host_ke tr ("Unable to create SSH key base directory '%1'.").arg (base_dir) + "\n" + tr ("Terminating application.")); + close (); } } @@ -10412,7 +10413,34 @@ QString ONMainWindow::generateKey(ONMainWindow::key_types key_type, bool host_ke << comment << "-f" << private_key_file; - QProcess::execute ("ssh-keygen", args); + + const int keygen_ret = QProcess::execute ("ssh-keygen", args); + + if (-2 == keygen_ret) { + QMessageBox::critical (this, tr ("ssh-keygen launching error"), + tr ("Unable to start the ssh-keygen binary.") + + "\n" + + tr ("Terminating application.")); + close (); + } + + if (-1 == keygen_ret) { + QMessageBox::critical (this, tr ("ssh-keygen crashed"), + tr ("The ssh-keygen binary crashed.") + + "\n" + + tr ("Terminating application.")); + close (); + } + + if (0 != keygen_ret) { + QMessageBox::critical (this, tr ("ssh-keygen program error"), + tr ("The ssh-keygen binary did not exit cleanly.") + + " " + + tr ("It was probably called with unknown arguments.") + + "\n" + + tr ("Terminating application.")); + close (); + } } return (ret); -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git