[X2Go-Commits] [x2goserver] 01/01: Support for rootless X2GoKdrive sessions.

git-admin at x2go.org git-admin at x2go.org
Thu Feb 17 19:46:55 CET 2022


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

x2go pushed a commit to branch master
in repository x2goserver.

commit 20c54c246e76fc9dffcc9bb3111c4dd36c4be2fb
Author: Oleksandr Shneyder <o.shneyder at phoca-gmbh.de>
Date:   Thu Feb 17 12:46:46 2022 -0600

    Support for rootless X2GoKdrive sessions.
---
 X2Go/Server/DB/SQLite3.pm     |  2 +-
 debian/changelog              |  1 +
 x2goserver/bin/x2gostartagent | 16 ++++++++++++++++
 3 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/X2Go/Server/DB/SQLite3.pm b/X2Go/Server/DB/SQLite3.pm
index e6fb22b8..2ef54a86 100644
--- a/X2Go/Server/DB/SQLite3.pm
+++ b/X2Go/Server/DB/SQLite3.pm
@@ -682,7 +682,7 @@ sub check_user
 	$realuser =~ s/\\//;
 
 	# perform the user check
-	$user =~ s/($realuser-[0-9]{2,}-[0-9]{10,}_st(D|R|K).*|.*-[0-9]{2,}-[0-9]{10,}_stS(0|1)XSHAD$realuser.*)/$realuser/;
+	$user =~ s/($realuser-[0-9]{2,}-[0-9]{10,}_st(D|R|K|A).*|.*-[0-9]{2,}-[0-9]{10,}_stS(0|1)XSHAD$realuser.*)/$realuser/;
 	$user eq $realuser or die "$realuser is not authorized";
 }
 
diff --git a/debian/changelog b/debian/changelog
index 852ecb84..62210413 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -458,6 +458,7 @@ x2goserver (4.1.0.4-0x2go1.2) UNRELEASED; urgency=medium
     - x2goruncommand: start Xsession on X2Go KDrive desktops.
     - x2goterminate-session: terminate x2goruncommand and all processes
       from the group.
+    - Support for rootless X2GoKdrive sessions.
 
   [ Tom Ruzicka ]
   * debian/po: Add Czech debconf translation.
diff --git a/x2goserver/bin/x2gostartagent b/x2goserver/bin/x2gostartagent
index ee63ac18..9486e62e 100755
--- a/x2goserver/bin/x2gostartagent
+++ b/x2goserver/bin/x2gostartagent
@@ -210,6 +210,7 @@ COLORDEPTH="$(awk '{split($0,a,"-depth_"); print a[2]}' <<< "${X2GO_TYPE}")"
 
 SESSION_TYPE='D'
 NOEXITPARAM=''
+ROOTLESPARAM=''
 
 AGENTBIN='x2goagent'
 
@@ -223,6 +224,14 @@ elif [[ "${X2GO_STYPE}" = 'S' ]]; then
 elif [[ "${X2GO_STYPE}" = 'K' ]]; then
 	SESSION_TYPE='K'
 	AGENTBIN='x2gokdrive'
+#rootless kdrive "A-Application mode"
+elif [[ "${X2GO_STYPE}" = 'A' ]]; then
+	SESSION_TYPE='A'
+	AGENTBIN='x2gokdrive'
+#kdrive published
+elif [[ "${X2GO_STYPE}" = 'B' ]]; then
+	SESSION_TYPE='A'
+	AGENTBIN='x2gokdrive'
 fi
 
 if [[ -z "${X2GO_CLIENT}" ]]; then
@@ -459,6 +468,13 @@ fi
 # but gets in the way of our persistent session scheme.
 loginctl 'enable-linger' &>'/dev/null' || :
 
+# x2gokdrive will accept -R as rootless parameter
+if [[ "${X2GO_STYPE}" = 'A' ]]; then
+	SESSION_TYPE='R'
+	AGENTBIN='x2gokdrive'
+fi
+
+
 X2GO_AGENT_PID='0'
 if [[ "${X2GO_STYPE}" = 'S' ]]; then
 	# unset LD_LIBRARY_PATH for the case when x2gostartagent started from x2godesktopsharing

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


More information about the x2go-commits mailing list