Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Jun 2005 23:51:35 -0500 (CDT)
From:      Midnight Oil <jamie@gnulife.org>
To:        freebsd-questions@freebsd.org
Subject:   Permissions on ps
Message-ID:  <20050606234735.D21034@floyd.gnulife.org>

next in thread | raw e-mail | index | archive | help



   I'm having difficulty understanding just how it is a regular
with simple priviliges is able to run ps.


ps accesses /dev/kmem to get a process list.


floyd% ls -al /dev/kmem
crw-r-----  1 root  kmem    2,   1 Jan 16  2004 /dev/kmem

 -- /dev/kmem is read/write accessable to root, and read accessable to
anyone in group kmem.



floyd% ls -al /bin/ps
-r-xr-xr-x  1 root  wheel  215368 Oct 27  2003 /bin/ps*


 -- /bin/ps is owned by root:wheel, no suid or sgid, so it should run as
whoever starts it (world executable).


  Million $$ question:
  How is it that anyone can run ps if ps accesses /dev/kmem? It shouldn't
be able to open that device. Any idea?



   - Jme






The Moon is New



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050606234735.D21034>