Can't call getpwuid(getuid()) at all since that causes recursive

lookups. Pointed out by Hai Zaar.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22199 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2007-12-07 13:43:25 +00:00
parent 8d8507fbf8
commit dcadcad1c3

View File

@@ -189,13 +189,12 @@ RAND_file_name(char *filename, size_t size)
pathp = 1; pathp = 1;
} }
} }
if (e == NULL) { /*
struct passwd *pw = getpwuid(getuid()); * Here we really want to call getpwuid(getuid()) but this will
if (pw) { * cause recursive lookups if the nss library uses
e = pw->pw_dir; * gssapi/krb5/hcrypto to authenticate to the ldap servers.
pathp = 1; */
}
}
if (e == NULL) if (e == NULL)
return NULL; return NULL;