Subject: x2goclient in broker mode with --broker-noauth

From: Sergey Savko <[email-masked]>
Date: Wed, 4 Feb 2015 14:41:35 +0400 (MSK)

Package: x2goclient
Version: 4.0.3.1
Tag: patch

If x2goclient started in broker mode without pass-through authentication (--broker-noauth) and authentication on the server, x2goclient connected from the user who started the x2goclient. 
That isn't right, we can run x2goclient from any user and connect to the servers as a different user. Just x2goclient can't restore session from suspend.
This patch allows you to start x2goclient from any user on the local system and connect to the server by the user that was entered in the authentication window.

-- 
Yours truly,
Sergey Savko.
From 270e5835fe49e0844874b97769e8de1532a2a039 Mon Sep 17 00:00:00 2001
From: Sergey_Savko <[email-masked]>
Date: Wed, 4 Feb 2015 12:24:18 +0300
Subject: [PATCH] x2goclient --broker-noauth patch

---
 onmainwindow.cpp |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/onmainwindow.cpp b/onmainwindow.cpp
index 5c346e6..828975f 100644
--- a/onmainwindow.cpp
+++ b/onmainwindow.cpp
@@ -3031,6 +3031,9 @@ void ONMainWindow::slotSessEnter()
 
     if(brokerMode)
     {
+        if (config.brokerNoAuth) {
+	    config.brokerUser = login->text();
+        }
         broker->selectUserSession(sessionExplorer->getLastSession()->id());
         config.session=sessionExplorer->getLastSession()->id();
         setStatStatus ( tr ( "Connecting to broker" ) );
-- 
1.7.10.4

---

From: Mike Gabriel <[email-masked]>
Date: Wed, 04 Feb 2015 14:59:07 +0000

Hi Alex,

On  Mi 04 Feb 2015 11:41:35 CET, Sergey Savko wrote:

> Package: x2goclient
> Version: 4.0.3.1
> Tag: patch
>
> If x2goclient started in broker mode without pass-through  
> authentication (--broker-noauth) and authentication on the server,  
> x2goclient connected from the user who started the x2goclient.
> That isn't right, we can run x2goclient from any user and connect to  
> the servers as a different user. Just x2goclient can't restore  
> session from suspend.
> This patch allows you to start x2goclient from any user on the local  
> system and connect to the server by the user that was entered in the  
> authentication window.

can you please review Sergey's patch attached to #781? Would switching  
to the X2Go Server username for the "selectsession" broker task break  
any of your deployed setups?

Optionally, I would suggest adding a cmdline option  
(--broker-noauth-with-session-username or such) that enables the  
provided patch (which makes sense from my point of view).

Greets,
Mike

-- 

DAS-NETZWERKTEAM
mike gabriel, herweg 7, 24357 fleckeby
fon: +49 (1520) 1976 148

GnuPG Key ID 0x25771B31
mail: [email-masked], http://das-netzwerkteam.de

freeBusy:
https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb