[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#551753: kills processes from thin client sessions which it shouldnt kill



Holger asked on IRC for the patch in BTS, to make it easier for the
stable release managers to review this change for inclusion in Lenny.
Here it is.  The issue at hand was that some part of the code used the
$user value and other parts used the $ruser part.  Both had to be
updated for users with long usernames.

ndex: debian/changelog
===================================================================
--- debian/changelog	(revision 62084)
+++ debian/changelog	(working copy)
@@ -1,3 +1,11 @@
+killer (0.90-7) unstable; urgency=low
+
+  * Fix linux-ps-longusernames.dpatch to also handle long usernames in
+    ruser, to avoid killing processes of user with usernames > 8
+    characters (Closes: #551753).
+
+ -- Petter Reinholdtsen <pere@debian.org>  Mon, 25 Jan 2010 19:03:03 +0100
+
 killer (0.90-6) unstable; urgency=low
 
   * Fix typo in linux-ps-longusernames.dpatch, returning the password
Index: debian/patches/linux-ps-longusernames.dpatch
===================================================================
--- debian/patches/linux-ps-longusernames.dpatch	(revision 62084)
+++ debian/patches/linux-ps-longusernames.dpatch	(working copy)
@@ -6,9 +6,9 @@
 
 @DPATCH@
 diff -urNad killer~/killer killer/killer
---- killer~/killer	2008-07-06 01:20:55.000000000 +0200
-+++ killer/killer	2008-07-06 01:20:55.000000000 +0200
-@@ -238,7 +238,10 @@
+--- killer~/killer	2010-01-25 19:01:46.000000000 +0100
++++ killer/killer	2010-01-25 19:02:08.000000000 +0100
+@@ -238,7 +238,11 @@
  
  	($user, $ruser, $uid, $ruid, $tty, $pid, $ppid, $nice, $comm) 
  		= split( /[ \t]+/, $_, 9 );
@@ -16,6 +16,7 @@
 +
 +        # Linux ps report uid when username is longer than 8 characters.
 +        $user = (getpwuid($user))[0] if ($user =~ m/^\d+/);
++        $ruser = (getpwuid($ruser))[0] if ($ruser =~ m/^\d+/);
 +
  	$pid2user{$pid} = $user;
  	$pid2ruser{$pid} = $ruser;

Happy hacking,
-- 
Petter Reinholdtsen



Reply to: