summaryrefslogtreecommitdiff
path: root/examples/misc
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2007-06-14 09:59:07 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:23:20 -0500
commit0b86e4030604bfbaca66df9f699a68bbf6db0824 (patch)
tree25043eac1134216817168d8401acfc926a068482 /examples/misc
parent4944a5227cedb52db3f08bfaa81cc4489efa6e28 (diff)
downloadsamba-0b86e4030604bfbaca66df9f699a68bbf6db0824.tar.gz
samba-0b86e4030604bfbaca66df9f699a68bbf6db0824.tar.bz2
samba-0b86e4030604bfbaca66df9f699a68bbf6db0824.zip
r23484: When chasing AD referrals make sure to honor the base returned from the server.
Guenther (This used to be commit 865bdcacae49299c19d7000242832fa41fdfa9d2)
Diffstat (limited to 'examples/misc')
-rwxr-xr-xexamples/misc/adssearch.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/misc/adssearch.pl b/examples/misc/adssearch.pl
index 4482222934..da22c57f7e 100755
--- a/examples/misc/adssearch.pl
+++ b/examples/misc/adssearch.pl
@@ -1781,8 +1781,9 @@ sub main () {
if (!$opt_notify && ($async_search->code == LDAP_REFERRAL)) {
foreach my $ref ($async_search->referrals) {
print "\ngot Referral: [$ref]\n";
+ my ($prot, $host, $base) = split(/\/+/, $ref);
$async_ldap_hd->unbind();
- $async_ldap_hd = get_ldap_hd($ref, 1);
+ $async_ldap_hd = get_ldap_hd($host, 1);
if (do_bind($async_ldap_hd, $sasl_bind) == -1) {
$async_ldap_hd->unbind();
next;