oaf-slay patch



I have just noticed that oaf-slay does not kill anything, because it uses $ENV{'USER'} instead of the real UID. May I commit that patch?
Index: test/oaf-slay
===================================================================
RCS file: /cvs/gnome/oaf/test/oaf-slay,v
retrieving revision 1.2.2.1
diff -u -r1.2.2.1 oaf-slay
--- test/oaf-slay       2001/05/09 18:07:21     1.2.2.1
+++ test/oaf-slay       2001/05/21 14:00:01
@@ -11,6 +11,7 @@
 #   running when script was run.
 #
 use             Getopt::Std;
+use             POSIX;
 
 $usage_error = 0;
 
@@ -43,10 +44,8 @@
 
 # Build ps command.
 #
-$username = $ENV{'USER'};
-
-chomp($username);
-$ps_cmd = "/bin/ps -e -opid,user,args | /bin/grep ".$username;
+$uid = getuid();
+$ps_cmd = "/bin/ps -U $uid -opid,args";
 
 # get OAF files
 #


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