[X2Go-Commits] [x2goclient] 01/01: {src/{help.cpp, onmainwindow.{cpp, h}}, man/man1/x2goclient.1}: pass-through broker credentials when connecting to a direct RDP session. Fixes: #1185.

git-admin at x2go.org git-admin at x2go.org
Sat Sep 23 15:40:11 CEST 2017


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository x2goclient.

commit 1309683a300547c3b95652da348b34d8303db009
Author: Walid Moghrabi <w.moghrabi at servicemagic.eu>
Date:   Sat Sep 23 15:37:17 2017 +0200

    {src/{help.cpp,onmainwindow.{cpp,h}},man/man1/x2goclient.1}: pass-through broker credentials when connecting to a direct RDP session. Fixes: #1185.
    
    Adds a new  --broker-use-creds-for-session parameter.
---
 debian/changelog      |  4 ++++
 man/man1/x2goclient.1 |  2 ++
 src/help.cpp          |  1 +
 src/onmainwindow.cpp  | 13 ++++++++++---
 src/onmainwindow.h    |  1 +
 5 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 47d7fdb..da05125 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -254,6 +254,10 @@ x2goclient (4.1.1.0-0x2go1) UNRELEASED; urgency=medium
     - {src/{help.cpp,onmainwindow.{cpp,h}},man/man1/x2goclient.1}: let
       --background take a directory and randomly pick an SVG file in there.
       Fixes: #1165.
+    - {src/{help.cpp,onmainwindow.{cpp,h}},man/man1/x2goclient.1}:
+      pass-through broker credentials when connecting to a direct RDP session.
+      Fixes: #1185.
+      Adds a new  --broker-use-creds-for-session parameter.
 
  -- X2Go Release Manager <git-admin at x2go.org>  Wed, 22 Feb 2017 07:13:10 +0100
 
diff --git a/man/man1/x2goclient.1 b/man/man1/x2goclient.1
index 29bebac..5738047 100644
--- a/man/man1/x2goclient.1
+++ b/man/man1/x2goclient.1
@@ -268,6 +268,8 @@ Send a change-password request to an X2Go Session Broker. Not supported by all b
 .TP
 \*(T<\fB\-\-broker-noauth-with-session-username\fR\*(T>
 Informs the broker to use the username you entered for X2Go Server authentication when selecting a server/session. Only has functionality if --broker-noauth is used.
+\*(T<\fB\-\-broker-use-creds-for-session\fR\*(T>
+Use broker credentials as session user/password credentials when using broker mode with broker authentication. Currently only affects direct RDP sessions.
 
 .SH LDAP OPTIONS (deprecated)
 NOTE: LDAP support won't be continued in X2Go Client 2 (next generation of X2Go Client).
diff --git a/src/help.cpp b/src/help.cpp
index f6cf50b..0e54df6 100644
--- a/src/help.cpp
+++ b/src/help.cpp
@@ -158,6 +158,7 @@ help::params_t help::build_params () {
   ADD_OPT ("--broker-ssh-key=<path to key>", QT_TRANSLATE_NOOP ("Help", "Sets the path to an SSH key to use for authentication against an SSH session broker. The client's behavior is undefined if this flag is used for non-SSH session brokers."));
   ADD_OPT ("--broker-autologin", QT_TRANSLATE_NOOP ("Help", "Enables the use of the default SSH key or SSH agent for authentication against an SSH session broker. The client's behavior is undefined if this flag is used for non-SSH session brokers."));
   ADD_OPT ("--broker-noauth", QT_TRANSLATE_NOOP ("Help", "Does not ask for user credentials during session broker authentication. This can be useful if you are using an HTTP(S) session broker without authentication. If you run an HTTP(S) server without authentication, but with user-specific profiles, then put the user name into the broker URL (refer to --broker-url.) The user name then will be extracted from the broker URL and be sent to the session broker. The client's behavior is undef [...]
+  ADD_OPT ("--broker-use-creds-for-session", QT_TRANSLATE_NOOP ("Help", "Use broker credentials as session user/password credentials when using broker mode with broker authentication. Currently only affects direct RDP sessions."));
   ADD_OPT ("--background=<svg-file|dir>", QT_TRANSLATE_NOOP ("Help", "Use a custom/branded background image (SVG format) for X2Go Client's main window. If a directory is given, will randomly pick an SVG file inside of it."));
   ADD_OPT ("--branding=<svg-file>", QT_TRANSLATE_NOOP ("Help", "Use a custom icon (SVG format) for additional branding to replace the default in the lower left corner of X2Go Client's main window."));
 
diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp
index 56f70db..7c3b870 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -74,6 +74,7 @@ ONMainWindow::ONMainWindow ( QWidget *parent ) :QMainWindow ( parent )
     keepTrayIcon=false;
     hideFolderSharing=false;
     brokerNoauthWithSessionUsername=false;
+    brokerCredsForSession=false;
     thinMode=false;
     closeDisconnect=false;
     showHaltBtn=false;
@@ -3499,10 +3500,10 @@ void ONMainWindow::startDirectRDP()
                                          ( QVariant ) "").toString();
 
     QString user,password;
-    if(!brokerMode)
+    if ((!brokerMode) || (brokerCredsForSession))
     {
-        user=login->text();
-        password=pass->text();
+        user=getCurrentUname();
+        password=getCurrentPass();
     }
     else
     {
@@ -7455,6 +7456,12 @@ bool ONMainWindow::parseParameter ( QString param )
         return true;
     }
 
+    if ( param=="--broker-use-creds-for-session" )
+    {
+        brokerCredsForSession=true;
+        return true;
+    }
+
     //force to show trayicon
     if (param == "--tray-icon")
     {
diff --git a/src/onmainwindow.h b/src/onmainwindow.h
index a5d518f..70dc37c 100644
--- a/src/onmainwindow.h
+++ b/src/onmainwindow.h
@@ -611,6 +611,7 @@ private:
     bool keepTrayIcon;
     bool hideFolderSharing;
     bool brokerNoauthWithSessionUsername;
+    bool brokerCredsForSession;
     bool defaultUseSound;
     bool defaultXinerama;
     bool cardStarted;

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