[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
setuid in gdomap - bug or feature?
From: |
Chris B. Vetter |
Subject: |
setuid in gdomap - bug or feature? |
Date: |
Thu, 3 May 2001 17:25:13 -0700 |
Hi,
I'm not sure if this is a bug or a feature, but I'm running in all kinds
of trouble with gdomap's setuid(3) call in main().
Instead of
if (getuid () != 0)
{
setuid (getuid ());
}
else
{
setuid (-1);
}
which (on my box) keeps gdomap running with UID 4294967295, a call to
getpwnam(3) similar to
struct passwd *pw = getpwnam("nobody");
setuid(pw->pw_uid);
would probably be a much "cleaner" approach.
Just a thought ...
--
Chris
- setuid in gdomap - bug or feature?,
Chris B. Vetter <=