From: Günther Deschner Date: Thu, 14 Jun 2007 09:59:07 +0000 (+0000) Subject: r23484: When chasing AD referrals make sure to honor the base returned from the server. X-Git-Tag: samba-4.0.0alpha6~801^2~5625 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0b86e4030604bfbaca66df9f699a68bbf6db0824;p=thirdparty%2Fsamba.git r23484: When chasing AD referrals make sure to honor the base returned from the server. Guenther (This used to be commit 865bdcacae49299c19d7000242832fa41fdfa9d2) --- diff --git a/examples/misc/adssearch.pl b/examples/misc/adssearch.pl index 4482222934f..da22c57f7e4 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;