oaf-slay kills non-OAF processes



Hi there,

when invoking oaf-slay (oaf 0.6.5) to kill my evolution that's gone
haywire, it unfortunately killed one ssh process which had the bad luck
to go to a machine called wombat, just as one of evolution's components
:-(. I skimmed through oaf-slay and found that it kills any process
containing the name of an OAF component in its name or arguments. As a
first shot, I patched oaf-slay so that it only kills processes
containing the string 'oaf' case-insensitively which should catch oafd
and the component processes ("--oaf-activate-iid", "OAFIID"). I know
that that's not a 100% secure as well, but still better than randomly
slaying user processes which aren't components anyway.

Here's the patch, could someone apply it?

------- 8< -------
--- /usr/bin/oaf-slay   Tue Jul 24 05:51:01 2001
+++ bin/oaf-slay        Mon Aug 13 11:12:22 2001
@@ -46,7 +46,7 @@
 $username = $ENV{'USER'};
 
 chomp($username);
-$ps_cmd = "/bin/ps -e -opid,user,args | /bin/grep ".$username;
+$ps_cmd = "/bin/ps -e -opid,user,args | /bin/grep ".$username." |
/bin/grep -i oaf";
 
 # get OAF files
 #
------- >8 -------

Nils
-- 
           Nils Philippsen / +49.711.96437.250 / nils redhat de
         Red Hat GmbH / Hauptstätter Straße 58 / D70178 Stuttgart
Petition for a software patent free Europe:
http://petition.EuroLinux.org/





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