From 36df32553379bae515d4cebe4195cc2229660839 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 29 Aug 2002 23:16:45 +0000 Subject: fix connecting to a BDC when the PDC is down but in WINS and no bcast can be used to find a BDC (This used to be commit e95d8e2c9ee5cf22b628f3e0d99fb74bcc632ea0) --- source3/nsswitch/winbindd_cm.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3/nsswitch') diff --git a/source3/nsswitch/winbindd_cm.c b/source3/nsswitch/winbindd_cm.c index ddab850cf0..8c11bd3372 100644 --- a/source3/nsswitch/winbindd_cm.c +++ b/source3/nsswitch/winbindd_cm.c @@ -145,6 +145,13 @@ static BOOL cm_rpc_find_dc(const char *domain, struct in_addr *dc_ip, fstring sr /* Lookup domain controller name. Try the real PDC first to avoid SAM sync delays */ + if (get_dc_list(True, domain, &ip_list, &count) && + name_status_find(domain, 0x1c, 0x20, ip_list[0], srv_name)) { + *dc_ip = ip_list[0]; + SAFE_FREE(ip_list); + return True; + } + 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)); -- cgit