mirror of
https://github.com/samba-team/samba.git
synced 2025-01-17 02:05:21 +03:00
sys_pwnam doesn't return talloced memory, so don't mix up the returned struct.
(cherry picked from commit eb99923991960e53bd150ac8f1d818cb746101b4)
This commit is contained in:
parent
4c7033df5d
commit
1b41f670fc
@ -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),
|
||||
|
Loading…
x
Reference in New Issue
Block a user