summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2007-06-14 09:59:07 +0000
committerGünther Deschner <gd@samba.org>2007-06-14 09:59:07 +0000
commit8f90cde123ddd66faeba8beea4e1eb1116ff098b (patch)
treedc5952616039f9613b113671627e38d6492fec1b
parent424bc791e509b56af5eb463422f4b6805f4091bc (diff)
downloadsamba-8f90cde123ddd66faeba8beea4e1eb1116ff098b.tar.gz
samba-8f90cde123ddd66faeba8beea4e1eb1116ff098b.tar.xz
samba-8f90cde123ddd66faeba8beea4e1eb1116ff098b.zip
r23484: When chasing AD referrals make sure to honor the base returned from the server.
Guenther
-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 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;