s3-utils: Use ads_do_search_retry in net ads search
authorAndrew Bartlett <abartlet@samba.org>
Fri, 18 May 2012 12:02:57 +0000 (22:02 +1000)
committerKarolin Seeger <kseeger@samba.org>
Mon, 28 May 2012 19:27:53 +0000 (21:27 +0200)
This makes it possible to search against a slow server, as will
fallback from 1000 to (eventually) 125 users at a time.

Andrew Bartlett

The last 4 patches addres bug #8943 (Slow but responsive DC can lock up winbindd
for > 10 minutes at a time).

source3/utils/net_ads.c

index 83aef18cef1293272f79657a36d355186fff98e3..e5e76be71a9bd7de494a5015ae5d94578df46cce 100644 (file)
@@ -2156,7 +2156,7 @@ static int net_ads_search(struct net_context *c, int argc, const char **argv)
        ldap_exp = argv[0];
        attrs = (argv + 1);
 
-       rc = ads_do_search_all(ads, ads->config.bind_path,
+       rc = ads_do_search_retry(ads, ads->config.bind_path,
                               LDAP_SCOPE_SUBTREE,
                               ldap_exp, attrs, &res);
        if (!ADS_ERR_OK(rc)) {