[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to identify the superuser in C

On Wed, Dec 11, 2002 at 11:07:11AM +0900, Oohara Yuuma wrote:
> The problem is that there is fakeroot. getuid() == 0 or
> geteuid() == 0 is not enough.  PAM is an overkill.
> I think seteuid(0) == 0 is the best approach.
> Any opinion?

i may be mistaken, but if you link statically against the libraries
that provide getuid, you no longer have the problem of geteuid() == 0,
correct?  it'll make your code bigger, but i think it'll prevent someone
from slipping in a dynamically linked library that provides a more
"liberal" attitude towards uids..


Attachment: pgp5b0k2l3v3C.pgp
Description: PGP signature

Reply to: