[X2Go-Commits] [x2goserver] 02/02: Legacy for applications (and X2Go scripts) that expect $SSH_CLIENT to be set in the X2Go session's environment. (Fixes: #644).

git-admin at x2go.org git-admin at x2go.org
Thu Feb 5 12:15:05 CET 2015


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

x2go pushed a commit to branch master
in repository x2goserver.

commit 142c50d7f475be2ea6ad6adae3521a7510ff3a70
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Thu Feb 5 12:14:22 2015 +0100

    Legacy for applications (and X2Go scripts) that expect $SSH_CLIENT to be set in the X2Go session's environment. (Fixes: #644).
---
 debian/changelog              |    2 ++
 x2goserver/bin/x2goruncommand |    7 +++++++
 2 files changed, 9 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index dc1f318..d62e2d7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -224,6 +224,8 @@ x2goserver (4.0.1.19-0x2go1) UNRELEASED; urgency=medium
       SLE 11.x.
     - Only call $dbh->sqlite_busy_timeout() if the $dbh object is capable of
       that. Works around a too-old DBD::SQLite package on SLE 11.x.
+    - Legacy for applications (and X2Go scripts) that expect $SSH_CLIENT to be
+      set in the X2Go session's environment. (Fixes: #644).
   * debian/control:
     + Add D (x2goserver): libfile-which-perl.
     + Add C (x2goserver: x2godesktopsharing (<< 3.1.1.2-0~). (Fixes: #700).
diff --git a/x2goserver/bin/x2goruncommand b/x2goserver/bin/x2goruncommand
index 71dbca1..e7e20e2 100755
--- a/x2goserver/bin/x2goruncommand
+++ b/x2goserver/bin/x2goruncommand
@@ -31,6 +31,13 @@ X2GO_LIB_PATH="$(x2gopath libexec)";
 
 "$X2GO_LIB_PATH/x2gosyslog" "$0" "info" "$(basename $0) called with options: $@"
 
+# newer SSH daemons don't set $SSH_CLIENT anymore...
+if [ -z "$SSH_CLIENT" ] && [ -n "$SSH_CONNECTION" ]; then
+	set -- $SSH_CONNECTION
+	SSH_CLIENT="$1 $2 $4"
+	export SSH_CLIENT
+fi
+
 export DISPLAY
 export XAUTHORITY=${XAUTHORITY:-"$HOME/.Xauthority"}
 export X2GO_AGENT_PID

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


More information about the x2go-commits mailing list