diff options
author | Günther Deschner <gd@samba.org> | 2006-04-28 14:48:22 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:16:33 -0500 |
commit | df980b79fc4f0c9ce4e3483fd4a01a38ac1737ee (patch) | |
tree | 244bf0662a458d8a301ac8429ee521474561858f /source3/nsswitch/winbindd_rpc.c | |
parent | 34e810076df8720a145f5a619ed648c384898563 (diff) | |
download | samba-df980b79fc4f0c9ce4e3483fd4a01a38ac1737ee.tar.gz samba-df980b79fc4f0c9ce4e3483fd4a01a38ac1737ee.tar.bz2 samba-df980b79fc4f0c9ce4e3483fd4a01a38ac1737ee.zip |
r15306: Be consistent between rpc and ads winbind backend: let the ads backend
query the samlogon cache first as well.
Guenther
(This used to be commit aa52b11dd450ca3ec1f156e17822b1c4971ef915)
Diffstat (limited to 'source3/nsswitch/winbindd_rpc.c')
-rw-r--r-- | source3/nsswitch/winbindd_rpc.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/source3/nsswitch/winbindd_rpc.c b/source3/nsswitch/winbindd_rpc.c index 669b5b923b..22df8d4db9 100644 --- a/source3/nsswitch/winbindd_rpc.c +++ b/source3/nsswitch/winbindd_rpc.c @@ -412,7 +412,6 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain, unsigned int i; fstring sid_string; uint32 user_rid; - NET_USER_INFO_3 *user; struct rpc_pipe_client *cli; DEBUG(3,("rpc: lookup_usergroups sid=%s\n", @@ -425,23 +424,10 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain, *user_grpsids = NULL; /* so lets see if we have a cached user_info_3 */ - - if ( (user = netsamlogon_cache_get( mem_ctx, user_sid )) != NULL ) - { - DEBUG(5,("lookup_usergroups: Cache lookup succeeded for %s\n", - sid_string_static(user_sid))); - - *num_groups = user->num_groups; - - (*user_grpsids) = TALLOC_ARRAY(mem_ctx, DOM_SID, *num_groups); - for (i=0;i<(*num_groups);i++) { - sid_copy(&((*user_grpsids)[i]), &domain->sid); - sid_append_rid(&((*user_grpsids)[i]), - user->gids[i].g_rid); - } - - SAFE_FREE(user); - + result = lookup_usergroups_cached(domain, mem_ctx, user_sid, + num_groups, user_grpsids); + + if (NT_STATUS_IS_OK(result)) { return NT_STATUS_OK; } |