[X2Go-Commits] [x2goclient] 201/267: src/onmainwindow.cpp: short out code parts unconditionally checking for the userSshd variable.

git-admin at x2go.org git-admin at x2go.org
Sat Dec 10 13:36:12 CET 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 c53c77b96c3930ad8f41cc0da6eca5c5c7e4f61d
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Mon Jul 4 05:24:49 2016 +0200

    src/onmainwindow.cpp: short out code parts unconditionally checking for the userSshd variable.
    
    We don't need it on Windows (and don't define it on purpose) because
    using an user-mode SSH daemon is implied there (for now.)
---
 debian/changelog     |    4 ++++
 src/onmainwindow.cpp |   19 ++++++++++++++++---
 2 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 495f248..0ae9faf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -342,6 +342,10 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium
       Windows for some reason.
     - src/pulsemanager.h: use windows_stdint.h header on Windows, cstdint
       otherwise.
+    - src/onmainwindow.cpp: short out code parts unconditionally checking for
+      the userSshd variable. We don't need it on Windows (and don't define it
+      on purpose) because using an user-mode SSH daemon is implied there (for
+      now.)
 
   [ Bernard Cafarelli ]
   * New upstream version (4.0.5.3):
diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp
index 178d1a2..8c24396 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -8287,8 +8287,13 @@ void ONMainWindow::slotRetExportDir ( bool result,QString output,
     /*
      * Do the user SSHD/global SSHD dance here and either use the
      * private .x2go/.ssh or the global .ssh dir.
+     *
+     * Note: Windows is implicitly always using an user-mode SSH server.
      */
-    if (userSshd) {
+#ifndef Q_OS_WIN
+    if (userSshd)
+#endif /* !defined (Q_OS_WIN) */
+    {
       authorized_keys_dir = QDir (authorized_keys_dir.absolutePath () + "/.x2go/");
     }
 
@@ -9565,15 +9570,23 @@ void ONMainWindow::startX2goMount()
     /*
      * Do the user SSHD/global SSHD dance here and either use the
      * private .x2go/.ssh or the global .ssh dir.
+     *
+     * Note: Windows is implicitly always using an user-mode SSH server.
      */
-    if (userSshd) {
+#ifndef Q_OS_WIN
+    if (userSshd)
+#endif /* !defined (Q_OS_WIN) */
+    {
       authorized_keys_dir = QDir (authorized_keys_dir.absolutePath () + "/.x2go/");
     }
 
     authorized_keys_dir = QDir (authorized_keys_dir.absolutePath () + "/.ssh/");
     QFile authorized_keys_file (authorized_keys_dir.absolutePath () + "/authorized_keys");
 
-    if (userSshd) {
+#ifndef Q_OS_WIN
+    if (userSshd)
+#endif /* !defined (Q_OS_WIN) */
+    {
       x2goDebug << "Creating dir " << authorized_keys_dir.absolutePath ();
       authorized_keys_dir.mkpath (authorized_keys_dir.absolutePath ());
     }

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