Date: Sat, 11 Sep 1999 11:31:04 -0500 From: Chris Costello <chris@calldei.com> To: Blaz Zupan <blaz@gold.amis.net> Cc: freebsd-current@FreeBSD.ORG Subject: Re: ps doesn't need privileges? Message-ID: <19990911113104.H906@holly.dyndns.org> In-Reply-To: <Pine.BSF.4.10.9909111819540.1010-100000@gold.amis.net> References: <19990911111820.G906@holly.dyndns.org> <Pine.BSF.4.10.9909111819540.1010-100000@gold.amis.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Sep 11, 1999, Blaz Zupan wrote: > /home/blaz> id > uid=1000(blaz) gid=1000(users) groups=1000(users) > /home/blaz> ls -l /dev/kmem > crw-r----- 1 root kmem 2, 1 May 23 15:26 /dev/kmem Oh. ps doesn't use /dev/kmem. Look at a ktrace of it; it works just as it should. /tmp/ps auwwx prints what it should and the ktrace output shows it opens the processes whose memory it can read (as ``nobody'' I could read httpd processes, my ksh process and my ps process) and errors for those it cannot: 8290 ps CALL __sysctl(0xbfbfc944,0x4,0xbfbfc954,0xbfbfc940,0,0) 8290 ps RET __sysctl 0 8290 ps CALL open(0xbfbfc878,0,0) 8290 ps NAMI "/proc/7997/mem" 8290 ps RET open -1 errno 13 Permission denied 8290 ps CALL close(0xffffffff) 8290 ps RET close -1 errno 9 Bad file descriptor -- |Chris Costello <chris@calldei.com> |CCITT - Can't Conceive Intelligent Thoughts Today `------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990911113104.H906>