This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goserver. commit 205a1ba6a270b7aa2d23c6c241ef309e4bd959d7 Author: Mihai Moldovan <ionic@ionic.de> Date: Sat Aug 13 03:11:23 2016 +0200 x2goserver-xsession/etc/Xsession: include hostname in session-x2go-errors file name. Part of #923. Cherry-picked from release/4.0.1.x branch. --- debian/changelog | 2 ++ x2goserver-xsession/etc/Xsession | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index aee1dc4..244cd10 100644 --- a/debian/changelog +++ b/debian/changelog @@ -319,6 +319,8 @@ x2goserver (4.0.1.20-0x2go1) UNRELEASED; urgency=low - x2goserver/man/man8/x2gocleansessions.8: drop obsolete man page. - x2goserver-xsession/etc/Xsession: fix uname calls when (potentially) creating session log/error file and add uname call where necessary. + - x2goserver-xsession/etc/Xsession: include hostname in + xsession-x2go-errors file name. Part of #923. * x2goserver.spec: - Add sudo and logcheck as BuildRequires and Requires. Don't own directories that are owned by sudo and logcheck. Logcheck is not diff --git a/x2goserver-xsession/etc/Xsession b/x2goserver-xsession/etc/Xsession index 5bfc60a..81264a0 100755 --- a/x2goserver-xsession/etc/Xsession +++ b/x2goserver-xsession/etc/Xsession @@ -59,6 +59,11 @@ for file in "/etc/profile" "$HOME/.profile" "/etc/xprofile" "$HOME/.xprofile"; d fi done +cur_hostname="$(hostname)" +if [ -z "${cur_name}" ] || [ "${cur_hostname}" = "(none)" ] || [ "${cur_hostname}" = "localhost" ]; then + errormsg "Hostname not set correctly; aborting." +fi + # initialize variables for use by all session scripts OPTIONFILE=/etc/x2go/Xsession.options @@ -70,14 +75,14 @@ SYSSESSIONDIR=/etc/x2go/Xsession.d USERXSESSION=$HOME/.xsession-x2go USERXSESSIONRC=$HOME/.xsessionrc-x2go ALTUSERXSESSION=$HOME/.Xsession-x2go -ERRFILE=$HOME/.xsession-x2go-errors +ERRFILE="${HOME}/.xsession-x2go-${cur_hostname}-errors" # attempt to create an error file; abort if we cannot if (umask 177 && touch "$ERRFILE") 2> /dev/null && [ -w "$ERRFILE" ] && [ ! -L "$ERRFILE" ]; then chmod 600 "$ERRFILE" elif ERRFILE=$(umask 077 && mktemp 2> /dev/null); then - if ! ln -sf "$ERRFILE" "${TMPDIR:=/tmp}/xsession-x2go-$USER"; then - message "warning: unable to symlink \"$TMPDIR/xsession-x2go-$USER\" to" \ + if ! ln -sf "$ERRFILE" "${TMPDIR:=/tmp}/xsession-x2go-${cur_hostname}-$USER"; then + message "warning: unable to symlink \"$TMPDIR/xsession-x2go-${cur_hostname}-$USER\" to" \ "\"$ERRFILE\"; look for session log/errors in" \ "\"$TMPDIR/xsession-x2go-$USER\"." fi -- Alioth's /srv/git/code.x2go.org/x2goserver.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git