Re: A few questions...
- From: John-Mark Gurney <gurney_j@xxxxxxxxxxxxxxxxxx>
- Date: Tue, 24 Jul 2007 15:51:57 -0700
Victor Loureiro Lima wrote this message on Tue, Jul 24, 2007 at 16:35 -0300:
2007/7/24, John-Mark Gurney <gurney_j@xxxxxxxxxxxxxxxxxx>:
Daniel Molina Wegener wrote this message on Mon, Jul 23, 2007 at 20:52
-0400:
a) Is there any function or variable that tells me which is the
root user UID in the system, or root always have 0 and it's
an "elegant" option to compare the variables or structure
members against zero.
#include <sys/conf.h>
uid == UID_ROOT
b) Can normal users look for system processes or kernel threads?
Yes, ps does this...
ps(1) either elevates its priviledges during execution, or has some
other way of medling into the afairs of other processes that will
eventually need some higher priviledge status (either that, or I am
really out-dated on modern operational systems)
hydrogen,ttypm,/home/johng,503$ls -l /bin/ps
-r-xr-xr-x 1 root wheel 31372 May 8 2005 /bin/ps*
So, as you see, no suid or sgid necessary for ps to function...
FreeBSD exports most/all of the info through sysctl which does not
require elevated privs to get...
And ps doesn't medling.. it's just a voyeur..
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"
- Follow-Ups:
- Re: A few questions...
- From: Victor Loureiro Lima
- Re: A few questions...
- References:
- A few questions...
- From: Daniel Molina Wegener
- Re: A few questions...
- From: John-Mark Gurney
- Re: A few questions...
- From: Victor Loureiro Lima
- A few questions...
- Prev by Date: Re: A few questions...
- Next by Date: Re: rsh help
- Previous by thread: Re: A few questions...
- Next by thread: Re: A few questions...
- Index(es):