This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository x2goserver. from 2cabb88c x2goserver-xsession/etc/Xsession: Detect $SHELL from getent passwd and use it to launch the session (on RHEL, SUSE, Gentoo and alike). (Fixes: #1434). new ef4bdbeb - x2gostartagent: save the XDMCP server in the session id. - x2gotermin atesession: don't terminate x2goruncommand on XDMCP sessions. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: X2Go/Utils.pm | 2 +- debian/changelog | 2 ++ x2goserver/bin/x2gostartagent | 4 ++++ x2goserver/bin/x2goterminate-session | 7 +++++-- 4 files changed, 12 insertions(+), 3 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goserver.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goserver. commit ef4bdbeb1b53e4d5119ee6789f372df44b250ed7 Author: Oleksandr Shneyder <o.shneyder@phoca-gmbh.de> Date: Tue Jul 26 12:26:14 2022 -0500 - x2gostartagent: save the XDMCP server in the session id. - x2gotermin atesession: don't terminate x2goruncommand on XDMCP sessions. --- X2Go/Utils.pm | 2 +- debian/changelog | 2 ++ x2goserver/bin/x2gostartagent | 4 ++++ x2goserver/bin/x2goterminate-session | 7 +++++-- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/X2Go/Utils.pm b/X2Go/Utils.pm index 4a4c7a24..cb4f3e79 100644 --- a/X2Go/Utils.pm +++ b/X2Go/Utils.pm @@ -146,7 +146,7 @@ sub sanitizer { $string =~ s/[^a-zA-Z0-9\.\_\-\@]//g; if ($string =~ /^([a-zA-Z0-9\.\_\-\@]*)$/) { $string = $1; - if ($string =~ /^([a-zA-Z0-9\.\_][a-zA-Z0-9\.\_\-\@]*)\-([\d]{2,4})\-([\d]{9,12})\_[a-zA-Z0-9\.\_\-]*\_dp[\d]{1,2}$/) { + if ($string =~ /^([a-zA-Z0-9\.\_][a-zA-Z0-9\.\_\-\@]*)\-([\d]{2,4})\-([\d]{9,12})\_[a-zA-Z0-9\.\_\-]*\_dp[\d]{1,2}[a-zA-Z0-9\.\_\-]*$/) { return $string; } else {return 0;} } else {return 0;} diff --git a/debian/changelog b/debian/changelog index 9aa24304..0e7efd72 100644 --- a/debian/changelog +++ b/debian/changelog @@ -471,6 +471,8 @@ x2goserver (4.1.0.4-0x2go1.2) UNRELEASED; urgency=medium from the group. - Support for rootless X2GoKdrive sessions. - Setting keyboard layout in rootless X2GoKdrive sessions. + - x2gostartagent: save the XDMCP server in the session id. + - x2gotermin atesession: don't terminate x2goruncommand on XDMCP sessions. [ Orion Paplowski ] * New upstream version (4.1.0.4): diff --git a/x2goserver/bin/x2gostartagent b/x2goserver/bin/x2gostartagent index 0e85b46e..24d88f64 100755 --- a/x2goserver/bin/x2gostartagent +++ b/x2goserver/bin/x2gostartagent @@ -258,6 +258,10 @@ for ((retry = 0; retry < max_retry; ++retry)); do SESSION_NAME="${SESSION_NAME}_st${SESSION_TYPE}${X2GO_CMD}_dp${COLORDEPTH}" SESSION_NAME="${SESSION_NAME//:/PP}" fi + if [[ -n "${X2GOXDMCP}" ]] ;then + SESSION_NAME="${SESSION_NAME}_${X2GOXDMCP}" + fi + # sanitize session name SESSION_NAME="$(perl -pe 's/[^a-zA-Z0-9\.\_\-\@]//g' <<< "${SESSION_NAME}")" diff --git a/x2goserver/bin/x2goterminate-session b/x2goserver/bin/x2goterminate-session index 3afd49db..a349c7ac 100755 --- a/x2goserver/bin/x2goterminate-session +++ b/x2goserver/bin/x2goterminate-session @@ -44,7 +44,6 @@ $X2GO_LIB_PATH/x2gosyslog "$0" "info" "$(basename $0) called with options: $@" X2GO_AGENT_PID=`$X2GO_LIB_PATH/x2gogetagent "$SESSION_NAME"` X2GO_AGENT_PID=`echo "$X2GO_AGENT_PID"| awk {'print $1'}` -X2GO_CMD_PID=`cat $PID_FILE` # stop x2godesktopsharing process gracefully... x2gofeature X2GO_DESKTOPSHARING &>/dev/null && x2goterminate-desktopsharing "$SESSION_NAME" || true @@ -53,7 +52,11 @@ x2gofeature X2GO_DESKTOPSHARING &>/dev/null && x2goterminate-desktopsharing "$SE x2gofeature X2GO_RUN_EXTENSIONS &>/dev/null && x2goserver-run-extensions "$SESSION_NAME" pre-terminate || true #terminate x2goruncommand process and all processes from group -kill -- -$X2GO_CMD_PID +#in case of XDMCP session cmd.pid won't exist +if [ -f $PID_FILE ];then + X2GO_CMD_PID=`cat $PID_FILE` + kill -- -$X2GO_CMD_PID +fi if kill -TERM $X2GO_AGENT_PID &>/dev/null; then $X2GO_LIB_PATH/x2gosyslog "$0" "notice" "session with ID "$SESSION_NAME" has been terminated successfully" -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goserver.git