1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-30 06:50:24 +03:00

r23484: When chasing AD referrals make sure to honor the base returned from the server.

Guenther
(This used to be commit 865bdcacae49299c19d7000242832fa41fdfa9d2)
This commit is contained in:
Günther Deschner 2007-06-14 09:59:07 +00:00 committed by Gerald (Jerry) Carter
parent 4944a5227c
commit 0b86e40306

View File

@ -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;