This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch release/4.0.1.x in repository x2goserver. commit 7495f92e7ec72d04fff3c5027bddb864cc99ca60 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Wed Aug 20 10:01:55 2014 +0200 Abort session startup if env var $USER or $SSH_CLIENT are not set. (Fixes: #558). --- debian/changelog | 2 ++ x2goserver/bin/x2gostartagent | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/debian/changelog b/debian/changelog index d19a819..e04c640 100644 --- a/debian/changelog +++ b/debian/changelog @@ -65,6 +65,8 @@ x2goserver (4.0.1.16-0x2go1) UNRELEASED; urgency=low - Silently timeout in x2golistdesktops if calls to x2golistsessions and/or xwininfo don't produce output within one second. (Fixes: #543). - Allow email addresses as login usernames. (Fixes: #573). + - Abort session startup if env var $USER or $SSH_CLIENT are not set. + (Fixes: #558). * debian/control, x2goserver.spec: + Update versioned D: x2goagent (>= 3.5.0.25). This assures that X2Go works with poly-instantiated /tmp directories. diff --git a/x2goserver/bin/x2gostartagent b/x2goserver/bin/x2gostartagent index 94d761b..1e9de90 100755 --- a/x2goserver/bin/x2gostartagent +++ b/x2goserver/bin/x2gostartagent @@ -27,9 +27,16 @@ $X2GO_LIB_PATH/x2gosyslog "$0" "info" "$(basename $0) called with options: $@" X2GO_PORT=49 #First port for X2GO=50 SSH_PORT=30000 #First ssh port 30001 +# some sanity checks before session startup... if egrep "^backend[ ]*=[ ]*postgres" /etc/x2go/x2gosql/sql 1>/dev/null 2>/dev/null && [ "x$USER" = "xroot" ]; then echo "The super-user \"root\" is not allowed to launch X2Go sessions." exit -1 +elif [ -z "$USER" ]; then + echo "The \$USER environment variable is not set. Aborting session startup." + exit -2 +elif [ -z "$SSH_CLIENT" ]; then + echo "The \$SSH_CLIENT environment variable is not set. Aborting session startup." + exit -3 fi X2GO_ROOT="${HOME}/.x2go" -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git