summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-11-14 12:49:18 +0100
committerVolker Lendecke <vl@samba.org>2008-11-14 12:57:18 +0100
commit1b41f670fc40ac583f546440c2a683e94eb05caf (patch)
treebd51231c633556eae949f6d30e39e0dd6ff2c0bc /source3/lib
parent4c7033df5da52bded995f3e4cccd0b78bf55a74f (diff)
downloadsamba-1b41f670fc40ac583f546440c2a683e94eb05caf.tar.gz
samba-1b41f670fc40ac583f546440c2a683e94eb05caf.tar.bz2
samba-1b41f670fc40ac583f546440c2a683e94eb05caf.zip
sys_pwnam doesn't return talloced memory, so don't mix up the returned struct.
(cherry picked from commit eb99923991960e53bd150ac8f1d818cb746101b4)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util_pw.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/source3/lib/util_pw.c b/source3/lib/util_pw.c
index e0dbc97f00..e138273e8b 100644
--- a/source3/lib/util_pw.c
+++ b/source3/lib/util_pw.c
@@ -59,10 +59,7 @@ struct passwd *getpwnam_alloc(TALLOC_CTX *mem_ctx, const char *name)
cached = tcopy_passwd(talloc_autofree_context(), temp);
if (cached == NULL) {
- /*
- * Just don't add this into the cache, ignore the failure
- */
- return temp;
+ return NULL;
}
memcache_add_talloc(NULL, GETPWNAM_CACHE, data_blob_string_const_null(name),