diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-03-19 10:17:42 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-03-19 10:17:42 +1100 |
commit | 9e6b0c28712ee77ce878809c8576826a3ba08d95 (patch) | |
tree | 1a325e474fbc22b1a1cadaf53a3af2c36e8d5ad2 /source4/heimdal/lib/hcrypto/rand.c | |
parent | 3530099cf226d591b687715b63b144d243e52083 (diff) | |
download | samba-9e6b0c28712ee77ce878809c8576826a3ba08d95.tar.gz samba-9e6b0c28712ee77ce878809c8576826a3ba08d95.tar.bz2 samba-9e6b0c28712ee77ce878809c8576826a3ba08d95.zip |
Merge lorikeet-heimdal -r 787 into Samba4 tree.
Andrew Bartlett
(This used to be commit d88b530522d3cef67c24422bd5182fb875d87ee2)
Diffstat (limited to 'source4/heimdal/lib/hcrypto/rand.c')
-rw-r--r-- | source4/heimdal/lib/hcrypto/rand.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/source4/heimdal/lib/hcrypto/rand.c b/source4/heimdal/lib/hcrypto/rand.c index 248fdde620..79dd39eb76 100644 --- a/source4/heimdal/lib/hcrypto/rand.c +++ b/source4/heimdal/lib/hcrypto/rand.c @@ -35,7 +35,7 @@ #include <config.h> #endif -RCSID("$Id: rand.c 21198 2007-06-20 05:10:41Z lha $"); +RCSID("$Id: rand.c 22199 2007-12-07 13:43:25Z lha $"); #include <stdio.h> #include <stdlib.h> @@ -189,13 +189,12 @@ RAND_file_name(char *filename, size_t size) pathp = 1; } } - if (e == NULL) { - struct passwd *pw = getpwuid(getuid()); - if (pw) { - e = pw->pw_dir; - pathp = 1; - } - } + /* + * Here we really want to call getpwuid(getuid()) but this will + * cause recursive lookups if the nss library uses + * gssapi/krb5/hcrypto to authenticate to the ldap servers. + */ + if (e == NULL) return NULL; |