[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: A few questions...
From:       "M. Warner Losh" <imp () bsdimp ! com>
Date:       2007-07-27 22:20:36
Message-ID: 20070727.162036.-1350495603.imp () bsdimp ! com
[Download RAW message or body]

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
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic