svn commit: samba r18557 - in branches/SAMBA_3_0/source/nsswitch: .

jra at samba.org jra at samba.org
Fri Sep 15 16:03:12 GMT 2006


Author: jra
Date: 2006-09-15 16:03:11 +0000 (Fri, 15 Sep 2006)
New Revision: 18557

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

Log:
If you've set security=ads, do the DNS queries first.
Doing otherwise means site support doesn't work correctly.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c	2006-09-15 15:27:13 UTC (rev 18556)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c	2006-09-15 16:03:11 UTC (rev 18557)
@@ -832,7 +832,6 @@
 		return True;
 	}
 
-#ifdef WITH_ADS
 	if (sec == SEC_ADS) {
 		/* We need to make sure we know the local site before
 		   doing any DNS queries, as this will restrict the
@@ -843,18 +842,16 @@
 		   We deliberately don't care about the
 		   return here. */
 		get_dc_name(domain->name, lp_realm(), dcname, &ip);
+
+		/* Now do the site-specific AD dns lookup. */
+		get_sorted_dc_list(domain->alt_name, &ip_list, &iplist_size, True);
         }
-#endif
 
-	/* try standard netbios queries first */
+	/* try standard netbios queries if no ADS */
 
-	get_sorted_dc_list(domain->name, &ip_list, &iplist_size, False);
+	if (iplist_size==0) 
+		get_sorted_dc_list(domain->name, &ip_list, &iplist_size, False);
 
-	/* check for security = ads and use DNS if we can */
-
-	if ( iplist_size==0 && sec == SEC_ADS ) 
-		get_sorted_dc_list(domain->alt_name, &ip_list, &iplist_size, True);
-
 	/* FIXME!! this is where we should re-insert the GETDC requests --jerry */
 
 	/* now add to the dc array.  We'll wait until the last minute 



More information about the samba-cvs mailing list