1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-29 11:21:54 +03:00

fix connecting to a BDC when the PDC is down but in WINS and no bcast

can be used to find a BDC
This commit is contained in:
Andrew Tridgell 0001-01-01 00:00:00 +00:00
parent 4fc06a9e22
commit e95d8e2c9e

View File

@ -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));