mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
r18620: Fallback to non-paging LDAP searches in ads_do_search_retry_internal()
for anonymous bound connections. When doing anonymous bind you can never use paged LDAP control for RootDSE searches on AD. Guenther
This commit is contained in:
parent
1a307954e5
commit
dc1d92faab
@ -50,7 +50,15 @@ static ADS_STATUS ads_do_search_retry_internal(ADS_STRUCT *ads, const char *bind
|
||||
}
|
||||
|
||||
*res = NULL;
|
||||
status = ads_do_search_all_args(ads, bp, scope, expr, attrs, args, res);
|
||||
|
||||
/* when binding anonymously, we cannot use the paged search LDAP
|
||||
* control - Guenther */
|
||||
|
||||
if (ads->auth.flags & ADS_AUTH_ANON_BIND) {
|
||||
status = ads_do_search(ads, bp, scope, expr, attrs, res);
|
||||
} else {
|
||||
status = ads_do_search_all_args(ads, bp, scope, expr, attrs, args, res);
|
||||
}
|
||||
if (ADS_ERR_OK(status)) {
|
||||
DEBUG(5,("Search for %s gave %d replies\n",
|
||||
expr, ads_count_replies(ads, *res)));
|
||||
@ -83,7 +91,16 @@ static ADS_STATUS ads_do_search_retry_internal(ADS_STRUCT *ads, const char *bind
|
||||
}
|
||||
|
||||
*res = NULL;
|
||||
status = ads_do_search_all_args(ads, bp, scope, expr, attrs, args, res);
|
||||
|
||||
/* when binding anonymously, we cannot use the paged search LDAP
|
||||
* control - Guenther */
|
||||
|
||||
if (ads->auth.flags & ADS_AUTH_ANON_BIND) {
|
||||
status = ads_do_search(ads, bp, scope, expr, attrs, res);
|
||||
} else {
|
||||
status = ads_do_search_all_args(ads, bp, scope, expr, attrs, args, res);
|
||||
}
|
||||
|
||||
if (ADS_ERR_OK(status)) {
|
||||
DEBUG(5,("Search for filter: %s, base: %s gave %d replies\n",
|
||||
expr, bp, ads_count_replies(ads, *res)));
|
||||
|
Loading…
Reference in New Issue
Block a user