summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_ads.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-04-28 14:48:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:16:33 -0500
commitdf980b79fc4f0c9ce4e3483fd4a01a38ac1737ee (patch)
tree244bf0662a458d8a301ac8429ee521474561858f /source3/nsswitch/winbindd_ads.c
parent34e810076df8720a145f5a619ed648c384898563 (diff)
downloadsamba-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_ads.c')
-rw-r--r--source3/nsswitch/winbindd_ads.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/nsswitch/winbindd_ads.c b/source3/nsswitch/winbindd_ads.c
index 336f27e6a1..ede1765273 100644
--- a/source3/nsswitch/winbindd_ads.c
+++ b/source3/nsswitch/winbindd_ads.c
@@ -626,6 +626,12 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
DEBUG(3,("ads: lookup_usergroups\n"));
*p_num_groups = 0;
+ status = lookup_usergroups_cached(domain, mem_ctx, sid,
+ p_num_groups, user_sids);
+ if (NT_STATUS_IS_OK(status)) {
+ return NT_STATUS_OK;
+ }
+
ads = ads_cached_connection(domain);
if (!ads) {
@@ -681,10 +687,12 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
/* there must always be at least one group in the token,
unless we are talking to a buggy Win2k server */
+
if (count == 0) {
+
status = lookup_usergroups_alt(domain, mem_ctx, user_dn,
- &primary_group,
- &num_groups, user_sids);
+ &primary_group,
+ &num_groups, user_sids);
*p_num_groups = (uint32)num_groups;
return status;
}