On 7/23/07, Darren Pilgrim <freebsd@bitfreak.org> wrote:
> Daniel Molina Wegener wrote:
> > 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.
>
> Root is always UID 0. Checking UID == 0 is the common practice for
> determining if the effective UID has root priveleges.
>
But should it be common practice? What of suser(9) and priv(9)?
-Ben Kaduk
_______________________________________________
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"