summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-08-23 21:04:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:38:47 -0500
commitfddeed8adba8004e4bb5678e07461382f6a5124b (patch)
tree45e7a298f474f80300c2bcc9781976428fe5b88e /source3/libsmb
parent049fcc8dd54a5fc93b27f84366880cc308a12ca6 (diff)
downloadsamba-fddeed8adba8004e4bb5678e07461382f6a5124b.tar.gz
samba-fddeed8adba8004e4bb5678e07461382f6a5124b.tar.bz2
samba-fddeed8adba8004e4bb5678e07461382f6a5124b.zip
r17760: The DNS SRV lookup already sorts by priority and weight so don't
use the generic IP list sort in get_sorted_dc_list(). (This used to be commit 03a767539d5b09ebd6564c0c9157de2a6e0e6b89)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/namequery.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index f6dbe3c548..0bd8bc7cb2 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -1356,6 +1356,9 @@ static BOOL get_dc_list(const char *domain, struct ip_service **ip_list,
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 @@ static BOOL get_dc_list(const char *domain, struct ip_service **ip_list,
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 */