[debian-edu-commits] debian-edu/ 21/31: Fix linux-ps-longusernames.dpatch to also handle long usernames in ruser, to avoid killing processes of user with usernames > 8 characters (Closes #551753).

Alexander Alemayhu ccscanf-guest at moszumanska.debian.org
Tue Jun 10 23:27:33 UTC 2014


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

ccscanf-guest pushed a commit to branch master
in repository killer.

commit 176042bd3469096de7912d09c8c75197006b4464
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Mon Jan 25 18:05:54 2010 +0000

    Fix linux-ps-longusernames.dpatch to also handle long usernames in
    ruser, to avoid killing processes of user with usernames > 8
    characters (Closes #551753).
---
 debian/changelog                             |  8 ++++++++
 debian/cron.hourly                           | 10 ++++++++++
 debian/patches/linux-ps-longusernames.dpatch |  7 ++++---
 3 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 920b71d..d6dc0f7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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 at 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
diff --git a/debian/cron.hourly b/debian/cron.hourly
index b21db4d..7a85ea2 100644
--- a/debian/cron.hourly
+++ b/debian/cron.hourly
@@ -1,3 +1,13 @@
 #!/bin/sh
 
+netgroup=killer-enabled-hosts
+
+for f in /usr/share/killer/config.d/*; do
+    . $f
+done
+
+if [ -f /etc/killer.conf ] ; then
+    . /etc/killer.conf
+fi
+
 [ -x /usr/sbin/killer ] && /usr/sbin/killer
diff --git a/debian/patches/linux-ps-longusernames.dpatch b/debian/patches/linux-ps-longusernames.dpatch
index 66dd196..542a8d7 100755
--- a/debian/patches/linux-ps-longusernames.dpatch
+++ b/debian/patches/linux-ps-longusernames.dpatch
@@ -6,9 +6,9 @@ uid if the username is more than 8 characters logn.
 
 @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 @@ diff -urNad killer~/killer killer/killer
 +
 +        # 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;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/pkg-team/killer.git



More information about the debian-edu-commits mailing list