svn commit: samba r23484 - in branches: SAMBA_3_0/examples/misc SAMBA_3_0_26/examples/misc

gd at samba.org gd at samba.org
Thu Jun 14 09:59:08 GMT 2007


Author: gd
Date: 2007-06-14 09:59:07 +0000 (Thu, 14 Jun 2007)
New Revision: 23484

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23484

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

Guenther

Modified:
   branches/SAMBA_3_0/examples/misc/adssearch.pl
   branches/SAMBA_3_0_26/examples/misc/adssearch.pl


Changeset:
Modified: branches/SAMBA_3_0/examples/misc/adssearch.pl
===================================================================
--- branches/SAMBA_3_0/examples/misc/adssearch.pl	2007-06-14 09:51:13 UTC (rev 23483)
+++ branches/SAMBA_3_0/examples/misc/adssearch.pl	2007-06-14 09:59:07 UTC (rev 23484)
@@ -1781,8 +1781,9 @@
 		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;

Modified: branches/SAMBA_3_0_26/examples/misc/adssearch.pl
===================================================================
--- branches/SAMBA_3_0_26/examples/misc/adssearch.pl	2007-06-14 09:51:13 UTC (rev 23483)
+++ branches/SAMBA_3_0_26/examples/misc/adssearch.pl	2007-06-14 09:59:07 UTC (rev 23484)
@@ -1781,8 +1781,9 @@
 		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;



More information about the samba-cvs mailing list