On Mon, Nov 19, 2018 at 12:00:20AM +0100, Petter Reinholdtsen wrote: > I had a look at the patch, and it is not obviously wrong, at least. I do > not know the code well any more, but did test and read it, and it might > work. I do not have x2go myself, so I can not test that part, though. Thanks for the feedback. I've now tested the patched killer script once again in a virtual machine environment: X2Go server running on a Debian Edu Buster combined server, X2Go Client on a Debian Edu Buster workstation with profile 'Standalone'. The complete set of X2Go component packages is available in testing since March 2018.
The killer script works like expected. A git format-patch is attatted, generated against killer.git as of today. Wolfgang
From 21264e60134d16f0eb9d9cb0ee92e07d55ce3539 Mon Sep 17 00:00:00 2001 From: Wolfgang Schweer <wschw...@arcor.de> Date: Tue, 20 Nov 2018 14:56:56 +0100 Subject: [PATCH] Exclude all jobs belonging to users running an X2Go session from being killed. --- debian/changelog | 7 +++++++ debian/patches/series | 1 + debian/patches/x2go.patch | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 debian/patches/x2go.patch diff --git a/debian/changelog b/debian/changelog index 0657909..a04bba5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +killer (0.90-14) UNRELEASED; urgency=medium + + * Exclude all jobs belonging to users running an X2Go session from being + killed. (Closes: #648219, #890517). + + -- Wolfgang Schweer <wschw...@arcor.de> Tue, 20 Nov 2018 14:41:33 +0100 + killer (0.90-13) unstable; urgency=medium * Team upload. diff --git a/debian/patches/series b/debian/patches/series index 68b50ae..d527c83 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -14,3 +14,4 @@ consoleuser-consolekit.patch consoleuser-xprintidle.patch consoleuser-logind.patch handle-ps-name-truncate.patch +x2go.patch diff --git a/debian/patches/x2go.patch b/debian/patches/x2go.patch new file mode 100644 index 0000000..822f920 --- /dev/null +++ b/debian/patches/x2go.patch @@ -0,0 +1,33 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run + +Exclude all jobs belonging to users running an X2Go session from being killed. + +@DPATCH@ +Index: killer-git/killer + +--- a/killer ++++ b/killer +@@ -1328,6 +1328,23 @@ Removes all processes of users with uid lower than the $minuid value. + + =item * + ++Exclude all jobs belonging to users running an X2Go session from being ++terminated. X2Go fails to register users in utemp/wtemp files; for more ++information, see: https://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=1171 ++ ++=cut ++ ++ my @x2gousers = (); ++ foreach my $pid ( keys %pid2comm ) { ++ next unless ( $pid2comm{$pid} eq 'x2goruncommand' ); ++ push(@x2gousers, $pid2user{$pid}); ++ } ++ foreach $user ( @x2gousers ) { ++ $ptable->removeProcesses('ruser', $user); ++ } ++ ++=item * ++ + Finally, the process table and terminal objects are returned. + + =back -- 2.19.1
signature.asc
Description: PGP signature