1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

r22023: I don't like this cache, but I think Jeremy is right, the consequences

of the talloc heirarchy created are too subtle, particularly with
callers picking out individual members.

This might fix the faults on the build farm.

Andrew Bartlett
(This used to be commit 82667bc75e)
This commit is contained in:
Andrew Bartlett 2007-04-02 06:26:16 +00:00 committed by Gerald (Jerry) Carter
parent ccc06f8441
commit ddf759c533

View File

@ -105,8 +105,8 @@ struct passwd *getpwnam_alloc(TALLOC_CTX *mem_ctx, const char *name)
}
pwnam_cache[i] = tcopy_passwd(pwnam_cache, temp);
/* while keeping this in the cache, reference a copy for the caller */
return (struct passwd *)talloc_reference(mem_ctx, pwnam_cache[i]);
return tcopy_passwd(pwnam_cache, temp);
}
struct passwd *getpwuid_alloc(TALLOC_CTX *mem_ctx, uid_t uid)