diff options
author | Andrew Tridgell <tridge@samba.org> | 2002-08-29 23:16:45 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2002-08-29 23:16:45 +0000 |
commit | 36df32553379bae515d4cebe4195cc2229660839 (patch) | |
tree | 98f0b9fe6c014582d0ac6bf51a85dd1696b5fb13 | |
parent | b9eec5b28461fa01b8a549edd1394879e1d8f9e6 (diff) | |
download | samba-36df32553379bae515d4cebe4195cc2229660839.tar.gz samba-36df32553379bae515d4cebe4195cc2229660839.tar.bz2 samba-36df32553379bae515d4cebe4195cc2229660839.zip |
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)
-rw-r--r-- | source3/nsswitch/winbindd_cm.c | 7 |
1 files changed, 7 insertions, 0 deletions
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)); |