summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-03-11 22:25:14 +0000
committerAndrew Tridgell <tridge@samba.org>2002-03-11 22:25:14 +0000
commit87bba35a62479e4ad81ee62e8135d5f5e08fb7e7 (patch)
tree65c237a17d1ae8439261f5ecee5b1a2f51ef70f0
parentdb4c62d7ed2eb5503927edf7e25c5a2fc94f4174 (diff)
downloadsamba-87bba35a62479e4ad81ee62e8135d5f5e08fb7e7.tar.gz
samba-87bba35a62479e4ad81ee62e8135d5f5e08fb7e7.tar.bz2
samba-87bba35a62479e4ad81ee62e8135d5f5e08fb7e7.zip
always make winbindd try for the PDC first before trying for a BDC
this prevents propogation delays in the SAM between the PDC and BDCs (This used to be commit 967cb3ed0c3190f3e95a227e4d998a7312b5990b)
-rw-r--r--source3/nsswitch/winbindd_cm.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source3/nsswitch/winbindd_cm.c b/source3/nsswitch/winbindd_cm.c
index 6ac682fbab..2c22ad46f2 100644
--- a/source3/nsswitch/winbindd_cm.c
+++ b/source3/nsswitch/winbindd_cm.c
@@ -140,11 +140,13 @@ static BOOL cm_get_dc_name(const char *domain, fstring srv_name, struct in_addr
DLIST_ADD(get_dc_name_cache, dcc);
- /* Lookup domain controller name */
-
- if (!get_dc_list(False, domain, &ip_list, &count)) {
- DEBUG(3, ("Could not look up dc's for domain %s\n", domain));
- return False;
+ /* Lookup domain controller name. Try the real PDC first to avoid
+ SAM sync delays */
+ if (!get_dc_list(True, domain, &ip_list, &count)) {
+ if (!get_dc_list(False, domain, &ip_list, &count)) {
+ DEBUG(3, ("Could not look up dc's for domain %s\n", domain));
+ return False;
+ }
}
/* Pick a nice close server */