Date: Fri, 27 Jul 2007 16:20:36 -0600 (MDT) From: "M. Warner Losh" <imp@bsdimp.com> To: dmw@unete.cl Cc: freebsd-hackers@freebsd.org Subject: Re: A few questions... Message-ID: <20070727.162036.-1350495603.imp@bsdimp.com> In-Reply-To: <200707232052.58485.dmw@unete.cl> References: <200707232052.58485.dmw@unete.cl>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <200707232052.58485.dmw@unete.cl>
Daniel Molina Wegener <dmw@unete.cl> writes:
:
: Hello,
:
: I need information about few things, I hope someone can help
: me and thanks in advance.
:
: 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.
The super user is always UID == 0. By definition.
The root account typically is 0, but doesn't have to be.
User accounts typically aren't 0, but can be (cf toor).
Any account with a uid of 0 is a super user.
It is the super user that gets all the toys.
: b) Can normal users look for system processes or kernel threads?
Sometimes. See the sysctls security.bsd.see_other_gids and
security.bsd.see_other_uids.
: c) Can root look for system processes or kernel threads?
If it is the super user, yes.
Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070727.162036.-1350495603.imp>
