diff options
author | Günther Deschner <gd@samba.org> | 2006-05-05 15:44:00 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:16:49 -0500 |
commit | c6fa16f330bbc0cc9f428622ca2c4ad0c75cf56a (patch) | |
tree | 32a67acc112954f06eefc20596c43972035cf4bd /source3 | |
parent | 4137c63d0236d429c33b718674b365c6efcba695 (diff) | |
download | samba-c6fa16f330bbc0cc9f428622ca2c4ad0c75cf56a.tar.gz samba-c6fa16f330bbc0cc9f428622ca2c4ad0c75cf56a.tar.bz2 samba-c6fa16f330bbc0cc9f428622ca2c4ad0c75cf56a.zip |
r15460: Prefer to use the indexed objectCategory attribute (instead of
objectClass which is not indexed on AD) in LDAP queries.
Guenther
(This used to be commit 847882a98328b91a2157959c5dad0a2023223846)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/nsswitch/winbindd_ads.c | 4 | ||||
-rw-r--r-- | source3/utils/net_ads.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source3/nsswitch/winbindd_ads.c b/source3/nsswitch/winbindd_ads.c index 30064603d1..d233821111 100644 --- a/source3/nsswitch/winbindd_ads.c +++ b/source3/nsswitch/winbindd_ads.c @@ -173,7 +173,7 @@ static NTSTATUS query_user_list(struct winbindd_domain *domain, goto done; } - rc = ads_search_retry(ads, &res, "(objectClass=user)", attrs); + rc = ads_search_retry(ads, &res, "(objectCategory=user)", attrs); if (!ADS_ERR_OK(rc) || !res) { DEBUG(1,("query_user_list ads_search: %s\n", ads_errstr(rc))); goto done; @@ -552,7 +552,7 @@ static NTSTATUS lookup_usergroups_alt(struct winbindd_domain *domain, /* buggy server, no tokenGroups. Instead lookup what groups this user is a member of by DN search on member*/ - if (!(ldap_exp = talloc_asprintf(mem_ctx, "(&(member=%s)(objectClass=group))", escaped_dn))) { + if (!(ldap_exp = talloc_asprintf(mem_ctx, "(&(member=%s)(objectCategory=group))", escaped_dn))) { DEBUG(1,("lookup_usergroups(dn=%s) asprintf failed!\n", user_dn)); SAFE_FREE(escaped_dn); status = NT_STATUS_NO_MEMORY; diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index e02da46b9c..cca8dd63d0 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -473,7 +473,7 @@ int net_ads_user(int argc, const char **argv) rc = ads_do_search_all_fn(ads, ads->config.bind_path, LDAP_SCOPE_SUBTREE, - "(objectclass=user)", + "(objectCategory=user)", opt_long_list_entries ? longattrs : shortattrs, usergrp_display, disp_fields); @@ -597,7 +597,7 @@ int net_ads_group(int argc, const char **argv) "\n-----------------------------\n"); rc = ads_do_search_all_fn(ads, ads->config.bind_path, LDAP_SCOPE_SUBTREE, - "(objectclass=group)", + "(objectCategory=group)", opt_long_list_entries ? longattrs : shortattrs, usergrp_display, disp_fields); |