Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jul 2007 00:37:53 -0500
From:      "Ben Kaduk" <minimarmot@gmail.com>
To:        "Darren Pilgrim" <freebsd@bitfreak.org>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>, dmw@unete.cl
Subject:   Re: A few questions...
Message-ID:  <47d0403c0707232237t272f4e7exb0f55c21bbd097c7@mail.gmail.com>
In-Reply-To: <46A577BB.5020400@bitfreak.org>
References:  <200707232052.58485.dmw@unete.cl> <46A577BB.5020400@bitfreak.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47d0403c0707232237t272f4e7exb0f55c21bbd097c7>