[X2Go-Commits] [pyhoca-cli] 03/04: Add cmdline option --broker-password. Masquerade broker password in process list (Linux/Mac only).

git-admin at x2go.org git-admin at x2go.org
Mon Mar 17 13:51:29 CET 2014


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

x2go pushed a commit to branch brokerclient
in repository pyhoca-cli.

commit 544b38a9e8ba2aa65bf025fdcfebba6e1bc6ccb9
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Mon Mar 17 13:50:13 2014 +0100

    Add cmdline option --broker-password. Masquerade broker password in process list (Linux/Mac only).
---
 debian/changelog      |    2 ++
 man/man1/pyhoca-cli.1 |    5 +++++
 pyhoca-cli            |    9 ++++++++-
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index e296084..2bd4fb2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
 pyhoca-cli (0.5.0.0-0x2go1) UNRELEASED; urgency=low
 
   * New upstream version (0.5.0.0):
+    - Add cmdline option --broker-password. Masquerade broker password
+      in process list (Linux/Mac only).
     - If a user name can neither be detected from the session profile, nor
       from the command line option, try the username used for the broker
       authentication.
diff --git a/man/man1/pyhoca-cli.1 b/man/man1/pyhoca-cli.1
index 049f8cf..46391b8 100644
--- a/man/man1/pyhoca-cli.1
+++ b/man/man1/pyhoca-cli.1
@@ -161,6 +161,11 @@ ssh://<user>:<password>@<hostname>:<port>/usr/bin/x2gobroker (or any executable
 provides the broker via SSH).
 
 .TP
+\*(T<\fB\-\-broker-password <password>\fR\*(T>
+Session broker password for retrieving session profiles from the X2Go Session Broker.
+The cleartext password that has been specified at the command line will be masqueraded in
+the systems process list (Linux, MacOS). On Windows systems the usage of the \-\-broker-password option is forbidden.
+.TP
 \*(T<\fB\-\-broker-cacertfile=</path/to/cafile.crt>\fR\*(T>
 Specify a special (self-signed) root-CACert file that shall get used when connecting to an X2Go Session Broker via https (SSL). (Not implemented, yet).
 .TP
diff --git a/pyhoca-cli b/pyhoca-cli
index 71ac0c6..523be1c 100755
--- a/pyhoca-cli
+++ b/pyhoca-cli
@@ -74,13 +74,19 @@ if app.startswith('./'):
     sys.path.insert(0, os.getcwd())
     os.environ['PYTHONX2GO_LOCAL'] = '1'
 
-PROG_OPTIONS = sys.argv[1:]
+PROG_OPTIONS = " ".join(sys.argv[1:]).replace("=", " ").split()
 try:
     _password_index = PROG_OPTIONS.index('--password')+1
     PROG_OPTIONS[_password_index] = "XXXXXXXX"
 except ValueError:
     # ignore if --password option is not specified
     pass
+try:
+    _broker_password_index = PROG_OPTIONS.index('--broker-password')+1
+    PROG_OPTIONS[_broker_password_index] = "XXXXXXXX"
+except ValueError:
+    # ignore if --broker-password option is not specified
+    pass
 
 from x2go import X2GOCLIENT_OS as _X2GOCLIENT_OS
 if _X2GOCLIENT_OS in ('Linux', 'Mac'):
@@ -176,6 +182,7 @@ print_options =  [
                  ]
 broker_options = [
                    {'args':['-B','--broker-url'], 'default': None, 'help': 'retrieve session profiles via an X2Go Session Broker under the given URL', },
+                   {'args':['--broker-password'], 'default': None, 'help': 'password for authenticating against the X2Go Session Broker', },
                  ]
 
 nx_options =     [

--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/pyhoca-cli.git



More information about the x2go-commits mailing list