[plug] Finding the UID of a process

Christian christian at amnet.net.au
Wed Jun 13 10:47:37 WST 2001


On Tue, Jun 12, 2001 at 09:40:36PM +0800, Mike Holland wrote:
> On Tue, 12 Jun 2001, Christian wrote:
> 
> > I've tried strace'ing ps and found that it gets all this info out of
> > /proc but obviously systems that don't have /proc must do it some other
> > way.
> 
> IIRC, old versions of ps would read the kernel memory. You can imagine
> why /proc is considered an improvement. I've never seen a system call for
> it.

Hmmm... that's interesting.  I knew that ps on non-proc systems was
setuid for the purpose of accessing kernel memory but I guess I thought
there must have been some more detailed information that it needed this
for.  To me it seems like one process wanting to find out the UID of
another process is a fairly trivial and acceptable operation and not one
that should require root access on POSIX systems that lack a procfs.  On
the other hand, Linux allowing processes to find out all this
information about other process would therefore seem to be perhaps
revealing too much information (in comparison with other systems).
Perhaps this is an area in which the standard is somewhat lacking...

-- 
DSA 0x0EC1D28C: BBCB 0D79 4EBB 078A A066  7267 8BED E9D6 0EC1 D28C



More information about the plug mailing list