git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b04a400
)
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:53:43 +0000
(12:53 +0100)
source/lib/util_pw.c
patch
|
blob
|
history
diff --git
a/source/lib/util_pw.c
b/source/lib/util_pw.c
index 428378505f7a1a1230e7499bb2d6bd0b7ee534b3..342e50994e54d8250fb5e4b636d15ab8a555b6f9 100644
(file)
--- a/
source/lib/util_pw.c
+++ b/
source/lib/util_pw.c
@@
-59,10
+59,7
@@
struct passwd *getpwnam_alloc(TALLOC_CTX *mem_ctx, const char *name)
cached = tcopy_passwd(NULL, 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(name),