git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c7033d
)
sys_pwnam doesn't return talloced memory, so don't mix up the returned struct.
author
Volker Lendecke
<vl@samba.org>
Fri, 14 Nov 2008 11:49:18 +0000
(12:49 +0100)
committer
Volker Lendecke
<vl@samba.org>
Fri, 14 Nov 2008 11:57:18 +0000
(12:57 +0100)
(cherry picked from commit
eb99923991960e53bd150ac8f1d818cb746101b4
)
source3/lib/util_pw.c
patch
|
blob
|
history
diff --git
a/source3/lib/util_pw.c
b/source3/lib/util_pw.c
index e0dbc97f0056093461ac676026662e5560093d42..e138273e8b15884ade8701098c1a4f2814ae7528 100644
(file)
--- 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),