Subject: Unrecognized arguments when using --broker-krblogin
From: Matthew Richardson <[email-masked]>
To: [email-masked]
Date: Tue, 06 Jan 2015 17:49:51 +0000

Package: x2goclient
Version: 4.0.2.1 (Qt - 4.8.6)

I am running x2goclient using the following cmd-line options:

x2goclient --debug --broker-krblogin
--broker-url=ssh://broker.example.com:22/usr/bin/x2gobroker

This returns a suitable session from the broker, but then fails to
connect, giving an error about invalid arguments:

x2go-DEBUG-../onmainwindow.cpp:2199> Reading 1 session from config file.
x2go-DEBUG-../onmainwindow.cpp:2803> Starting session via smartcard,
ssh-agent or kerberos token.
x2go-DEBUG-../httpbrokerclient.cpp:282> called selectUserSessions
x2go-DEBUG-../httpbrokerclient.cpp:467> "usage: x2gobroker.orig [-h] [-M
BROKER_MODE] [-C CONFIG_FILE] [-d] [-i]
                       [-b BIND_ADDRESS] [-D] [-P PIDFILE] [-L LOGDIR]
                       [--task BROKER_TASK] [--user USER_NAME]
                       [--auth-cookie AUTH_ID] [--profile-id PROFILE_ID]
                       [--backend BROKER_BACKEND]
x2gobroker.orig: error: unrecognized arguments: echo
X2GODATAEND:4fc77554-09cf-446a-bd44-1c2abaf8238d
"

If I run the client without the '--broker-krblogin' option, and
authenticate to the broker using password or ssh key, this error never
appears and the connection to the server (from the downloaded session)
succeeds.

I tried replacing the x2gobroker with a wrapper that calls it via
strace, and I see the following in the strace output:

execve("/usr/bin/x2gobroker.orig", ["/usr/bin/x2gobroker.orig",
"--user", "mrichar1", "--authid",
"f4d2e31c-8438-4cd3-8248-4b35f86e07ff", "--task", "selectsession",
"--sid", "pool-icewm;", "echo",
"X2GODATAEND:9c607aa1-a3c3-4c29-a7dc-36847ec8ceb0"], [/* 24 vars */])

I notice that the semi-colon separating the sid value and the subsequent
command appears inside the sid value quotes, which seems wrong - indeed
running this as a test gives:

x2gobroker --debug --sid "test;" true

x2gobroker.orig: error: unrecognized arguments: true

Can this quoting be sorted out to allow the use of the --broker-krblogin
option?

Thanks,

Matthew

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.