[sudo-workers] getpwuid can't find user if NSCD is not running
rhatuk
rhatuk66 at googlemail.com
Fri Jun 15 13:20:41 EDT 2007
Hi guys,
since some days ago I'm facing an issue trying to put sudo to work with ldap
support.
I didn't went through the whole code, but I've noticed that when run through
the sudo code, the next call to "getpwuid" actually returns null IF the nscd
daemon is not running: (If running it just goes fine) -- The user ID that
reachs to this call is stored on the ldap directory.
/*
* Get a password entry by uid and allocate space for it.
* Fills in pw_passwd from shadow file if necessary.
*/
struct passwd *
sudo_getpwuid(uid)
uid_t uid;
{
struct passwd *pw;
if ((pw = getpwuid(uid)) == NULL)
return(NULL);
else
return(sudo_pwdup(pw));
}
I made a small program to check the "getpwuid" with exactly the same userid,
and it works independently of having the nscd running or not, so I "suppose"
that at some point of the sudo code some variable that controls the behavior
of this call is set/altered from its default value? (maybe something caused
by the configure script?)
Can you advice/idea or more details requirement is welcome!
Thanks in advance,
C.
More information about the sudo-workers
mailing list