Bugtraq mailing list archives

/proc ps for Solaris 2.X


From: Doug.Hughes () Eng Auburn EDU (Doug Hughes)
Date: Wed, 16 Aug 1995 08:35:53 -0500


I found that the program would not work if I tried to put the root shell in
my home dir, which was mounted via NFS.  I tried fo half an hour.
If I tried moving it to /tmp, it worked within a minute, a couple of times.

Is there a /proc based ps? It seems to me that this would be a better fix.


Well, I wrote a quick and dirty /proc ps some time in the past. The
motivation was that regular ps gets stuck when an I/O device is not
available, but the /proc based ps doesn't, hence it will allow you to
see all the processes, whether one is stuck on I/O or not. It's also
a lot faster than regular ps. Right now it only does
process_id  terminal  user   process_name

But it would be trivial to add more functionality to it if desired.

Disadvantages: must be suid root to be useful for a normal user. (since
currently it has no flags and uses no temp files, there is very little
that could be exploited as a security hole.) In fact the entire file
is 68 lines long.


ftp.eng.auburn.edu:pub/doug/qps.c

--
____________________________________________________________________________
Doug Hughes                                     Engineering Network Services
System/Net Admin                                Auburn University
                        doug () eng auburn edu
                "Real programmers use cat > file.as"



Current thread: