[X2Go-Commits] [x2gobroker] 01/02: Update x2gobroker-ssh-mini - x2goclient expects a username in the 15th column of the string sent by the broker. x2golistsession (which x2gobroker-mini-ssh uses to generate the string) does not output the username there, so we inject it using awk.

git-admin at x2go.org git-admin at x2go.org
Thu Jun 20 23:17:09 CEST 2024


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

x2go pushed a commit to branch master
in repository x2gobroker.

commit 33080a792dc2af0ce4aabfb9e108f4ee216b6b7a
Author: Stefan Baur <x2go-ml-1 at baur-itcs.de>
Date:   Thu Mar 28 16:02:51 2024 +0000

    Update x2gobroker-ssh-mini - x2goclient expects a username in the 15th column of the string sent by the broker. x2golistsession (which x2gobroker-mini-ssh uses to generate the string) does not output the username there, so we inject it using awk.
---
 mini/x2gobroker-ssh-mini | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mini/x2gobroker-ssh-mini b/mini/x2gobroker-ssh-mini
index 7c2b5e8..56e3c56 100644
--- a/mini/x2gobroker-ssh-mini
+++ b/mini/x2gobroker-ssh-mini
@@ -227,7 +227,7 @@ elif (echo -e "$PARAMLIST" | grep -q -- '--task selectsession'); then
 		echo -e "Access granted"
 		echo -e "SERVER:$SERVER:$PORT"
 		# check for suspended sessions
-		SESSIONLIST=$(x2golistsessions)
+		SESSIONLIST=$(x2golistsessions | awk 'BEGIN{FS=OFS="|"}{$15 = "'${USER}'" OFS $15}1')
 		# NOTE: at present, this only checks for local sessions (X2GoBroker==X2GoServer)
 		# to make this work with a separate X2GoServer, we would need something like
 		#if [ -z "$SESSIONLIST" ] && [ -n "$SSH_AUTH_SOCK" ]; then

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git


More information about the x2go-commits mailing list