[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.

fakeroot (or any other dynamic linker tricks) will not work on set[ug]id
programs.  libc can be trusted here.

-- 
 - mdz



Reply to: