diff options
author | Tim Potter <tpot@samba.org> | 2001-11-26 01:20:57 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2001-11-26 01:20:57 +0000 |
commit | 19b9f9fbaea7bc446e77426f1f1b7f2bb2c14d77 (patch) | |
tree | 153353c1106ae7af45169519c5cd280542e7b9ac /source3/nsswitch/winbindd_util.c | |
parent | 4348dfe7afe5cfb1e60fa7b2fbbcd08e6fe299fe (diff) | |
download | samba-19b9f9fbaea7bc446e77426f1f1b7f2bb2c14d77.tar.gz samba-19b9f9fbaea7bc446e77426f1f1b7f2bb2c14d77.tar.bz2 samba-19b9f9fbaea7bc446e77426f1f1b7f2bb2c14d77.zip |
Removed bogus SAFE_FREE() call of talloced return data from
winbindd_lookup_usergroups()
(This used to be commit dd2048c418da7a08bc71305491953731fc427f5a)
Diffstat (limited to 'source3/nsswitch/winbindd_util.c')
-rw-r--r-- | source3/nsswitch/winbindd_util.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c index 75ed3a9efe..c603bac054 100644 --- a/source3/nsswitch/winbindd_util.c +++ b/source3/nsswitch/winbindd_util.c @@ -403,7 +403,6 @@ BOOL winbindd_lookup_sid_by_name(char *name, DOM_SID *sid, enum SID_NAME_USE *ty return False; /* Negative cache hit. */ return True; } - /* Lookup name */ if (!(mem_ctx = talloc_init())) @@ -431,7 +430,7 @@ BOOL winbindd_lookup_sid_by_name(char *name, DOM_SID *sid, enum SID_NAME_USE *ty *type = types[0]; /* Store the forward and reverse map of this lookup in the cache. */ - store_sid_by_name_in_cache(name, &sids[0], types[0]); + store_sid_by_name_in_cache(name, &sids[0], types[0]); store_name_by_sid_in_cache(&sids[0], name, types[0]); } else { /* JRA. Here's where we add the -ve cache store with a name type of SID_NAME_USE_NONE. */ @@ -587,19 +586,16 @@ BOOL winbindd_lookup_userinfo(struct winbindd_domain *domain, /* Lookup groups a user is a member of. I wish Unix had a call like this! */ BOOL winbindd_lookup_usergroups(struct winbindd_domain *domain, + TALLOC_CTX *mem_ctx, uint32 user_rid, uint32 *num_groups, DOM_GID **user_groups) { - TALLOC_CTX *mem_ctx; CLI_POLICY_HND *hnd; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; POLICY_HND dom_pol, user_pol; uint32 des_access = SEC_RIGHTS_MAXIMUM_ALLOWED; BOOL got_dom_pol = False, got_user_pol = False; - if (!(mem_ctx = talloc_init())) - return False; - /* Get sam handle */ if (!(hnd = cm_get_sam_handle(domain->name))) @@ -639,8 +635,6 @@ BOOL winbindd_lookup_usergroups(struct winbindd_domain *domain, if (got_dom_pol) cli_samr_close(hnd->cli, mem_ctx, &dom_pol); - talloc_destroy(mem_ctx); - return NT_STATUS_IS_OK(result); } |