From 6b36fa3a8ad3a71850493f62ab4edebc3a57c9fc Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 10 Dec 2001 06:21:44 +0000 Subject: use objectCategory instead of objectClass for faster searching (This used to be commit 4d3b827e5ac1ac20ec31acdc1e2a0264f1c18e43) --- source3/nsswitch/winbindd_ads.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3') diff --git a/source3/nsswitch/winbindd_ads.c b/source3/nsswitch/winbindd_ads.c index fc04f8932d..7f9d2eb4e5 100644 --- a/source3/nsswitch/winbindd_ads.c +++ b/source3/nsswitch/winbindd_ads.c @@ -165,7 +165,7 @@ static NTSTATUS query_user_list(struct winbindd_domain *domain, ads = ads_cached_connection(domain); if (!ads) goto done; - rc = ads_search_retry(ads, &res, "(objectclass=user)", attrs); + rc = ads_search_retry(ads, &res, "(objectCategory=user)", attrs); if (rc) { DEBUG(1,("query_user_list ads_search: %s\n", ads_errstr(rc))); goto done; @@ -256,7 +256,7 @@ static NTSTATUS enum_dom_groups(struct winbindd_domain *domain, ads = ads_cached_connection(domain); if (!ads) goto done; - rc = ads_search_retry(ads, &res, "(objectclass=group)", attrs); + rc = ads_search_retry(ads, &res, "(objectCategory=group)", attrs); if (rc) { DEBUG(1,("query_user_list ads_search: %s\n", ads_errstr(rc))); goto done; @@ -591,7 +591,7 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain, sid_from_rid(domain, group_rid, &group_sid); sidstr = sid_binstring(&group_sid); /* search for all users who have that group sid as primary group or as member */ - asprintf(&exp, "(&(objectclass=user)(|(primaryGroupID=%d)(memberOf=%s)))", + asprintf(&exp, "(&(objectCategory=user)(|(primaryGroupID=%d)(memberOf=%s)))", group_rid, sidstr); rc = ads_search_retry(ads, &res, exp, attrs); free(exp); -- cgit