summaryrefslogtreecommitdiff
path: root/examples/misc/adssearch.pl
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-09-19 22:57:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:00:48 -0500
commit89100480e8693ed0ad248b5c59187dec92c1fbb9 (patch)
treec63ad9d77ae6f418bc2aa5938640209b59e5dfa6 /examples/misc/adssearch.pl
parent7cf3a10756a0b462d49235c91099312416319ae6 (diff)
downloadsamba-89100480e8693ed0ad248b5c59187dec92c1fbb9.tar.gz
samba-89100480e8693ed0ad248b5c59187dec92c1fbb9.tar.bz2
samba-89100480e8693ed0ad248b5c59187dec92c1fbb9.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 (This used to be commit d6849a83c01ee444931ffaa34c77b5fb7f4c8a5c)
Diffstat (limited to 'examples/misc/adssearch.pl')
-rwxr-xr-xexamples/misc/adssearch.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/misc/adssearch.pl b/examples/misc/adssearch.pl
index f2be1ddcde..70c8f37cd4 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();