diff options
author | Günther Deschner <gd@samba.org> | 2006-09-19 22:57:13 +0000 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2006-09-19 22:57:13 +0000 |
commit | 1fe9937300b509acf6a907ebc75a5fc98f9983f1 (patch) | |
tree | 304c35d8edaeace4d078a0c680042ba971d91d97 /examples | |
parent | d67526fa7c4d0fdc4f63d2f0a31fcb67bc44aa61 (diff) | |
download | samba-1fe9937300b509acf6a907ebc75a5fc98f9983f1.tar.gz samba-1fe9937300b509acf6a907ebc75a5fc98f9983f1.tar.xz samba-1fe9937300b509acf6a907ebc75a5fc98f9983f1.zip |
r18697: Make sure that adssearch.pl does not
* chase referrals
* use paged search control
when using the LDAP change notify control for monitoring changes.
Guenther
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/misc/adssearch.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/misc/adssearch.pl b/examples/misc/adssearch.pl index f2be1ddcdee..70c8f37cd48 100755 --- a/examples/misc/adssearch.pl +++ b/examples/misc/adssearch.pl @@ -130,7 +130,7 @@ if ($opt_fastbind && !$opt_simpleauth) { } if ($opt_notify) { - $opt_paging = 0; + $opt_paging = undef; } # get the query @@ -1562,7 +1562,7 @@ sub default_callback { my ($res,$obj) = @_; - if ($res->code == LDAP_REFERRAL) { + if (!$opt_notify && $res->code == LDAP_REFERRAL) { return; } @@ -1753,7 +1753,7 @@ sub main () { scope => $scope, ) || die "cannot search"; - if ($async_search->code == LDAP_REFERRAL) { + if (!$opt_notify && ($async_search->code == LDAP_REFERRAL)) { foreach my $ref ($async_search->referrals) { print "\ngot Referral: [$ref]\n"; $async_ldap_hd->unbind(); |