diff options
author | Andrew Tridgell <tridge@samba.org> | 2002-03-11 22:25:14 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2002-03-11 22:25:14 +0000 |
commit | 967cb3ed0c3190f3e95a227e4d998a7312b5990b (patch) | |
tree | 12d3767937a3b79dd51fcc1c575978a4b8a38ce4 | |
parent | d85133e2697eb22f1573c78447b57791ae63dd6b (diff) | |
download | samba-967cb3ed0c3190f3e95a227e4d998a7312b5990b.tar.gz samba-967cb3ed0c3190f3e95a227e4d998a7312b5990b.tar.xz samba-967cb3ed0c3190f3e95a227e4d998a7312b5990b.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
-rw-r--r-- | source/nsswitch/winbindd_cm.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/nsswitch/winbindd_cm.c b/source/nsswitch/winbindd_cm.c index 6ac682fbaba..2c22ad46f2b 100644 --- a/source/nsswitch/winbindd_cm.c +++ b/source/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 */ |