svn commit: samba r17760 - in branches: SAMBA_3_0/source/libsmb
SAMBA_3_0_23/source/libsmb
jerry at samba.org
jerry at samba.org
Wed Aug 23 21:04:47 GMT 2006
Author: jerry
Date: 2006-08-23 21:04:47 +0000 (Wed, 23 Aug 2006)
New Revision: 17760
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17760
Log:
The DNS SRV lookup already sorts by priority and weight so don't
use the generic IP list sort in get_sorted_dc_list().
Modified:
branches/SAMBA_3_0/source/libsmb/namequery.c
branches/SAMBA_3_0_23/source/libsmb/namequery.c
Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/namequery.c
===================================================================
--- branches/SAMBA_3_0/source/libsmb/namequery.c 2006-08-23 19:33:44 UTC (rev 17759)
+++ branches/SAMBA_3_0/source/libsmb/namequery.c 2006-08-23 21:04:47 UTC (rev 17760)
@@ -1356,6 +1356,9 @@
BOOL done_auto_lookup = False;
int auto_count = 0;
+ *ordered = False;
+
+
/* if we are restricted to solely using DNS for looking
up a domain controller, make sure that host lookups
are enabled for the 'name resolve order'. If host lookups
@@ -1365,14 +1368,17 @@
fstrcpy( resolve_order, lp_name_resolve_order() );
strlower_m( resolve_order );
if ( ads_only ) {
- if ( strstr( resolve_order, "host" ) )
+ if ( strstr( resolve_order, "host" ) ) {
fstrcpy( resolve_order, "ads" );
+
+ /* DNS SRV lookups used by the ads resolver
+ are already sorted by priority and weight */
+ *ordered = True;
+ }
else
fstrcpy( resolve_order, "NULL" );
}
- *ordered = False;
-
/* fetch the server we have affinity for. Add the
'password server' list to a search for our domain controllers */
Modified: branches/SAMBA_3_0_23/source/libsmb/namequery.c
===================================================================
--- branches/SAMBA_3_0_23/source/libsmb/namequery.c 2006-08-23 19:33:44 UTC (rev 17759)
+++ branches/SAMBA_3_0_23/source/libsmb/namequery.c 2006-08-23 21:04:47 UTC (rev 17760)
@@ -1356,6 +1356,9 @@
BOOL done_auto_lookup = False;
int auto_count = 0;
+ *ordered = False;
+
+
/* if we are restricted to solely using DNS for looking
up a domain controller, make sure that host lookups
are enabled for the 'name resolve order'. If host lookups
@@ -1365,14 +1368,17 @@
fstrcpy( resolve_order, lp_name_resolve_order() );
strlower_m( resolve_order );
if ( ads_only ) {
- if ( strstr( resolve_order, "host" ) )
+ if ( strstr( resolve_order, "host" ) ) {
fstrcpy( resolve_order, "ads" );
+
+ /* DNS SRV lookups used by the ads resolver
+ are already sorted by priority and weight */
+ *ordered = True;
+ }
else
fstrcpy( resolve_order, "NULL" );
}
- *ordered = False;
-
/* fetch the server we have affinity for. Add the
'password server' list to a search for our domain controllers */
More information about the samba-cvs
mailing list