diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-01-15 10:30:58 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:08:50 -0500 |
commit | da19be9a76447461857aa3bd6189a5a1bd7d78c2 (patch) | |
tree | c3763998eb11c3f8d7f45be61540abc9c7f98d43 /source4/libcli/namequery_dc.c | |
parent | 4e4afdb94685388f56061a5cc188a5f5b8e1ae52 (diff) | |
download | samba-da19be9a76447461857aa3bd6189a5a1bd7d78c2.tar.gz samba-da19be9a76447461857aa3bd6189a5a1bd7d78c2.tar.bz2 samba-da19be9a76447461857aa3bd6189a5a1bd7d78c2.zip |
r4755: the recent change in the definition of lp_passwordserver() breaks this
old code, so I'm just removing it, as it needs replacing anyway
(This used to be commit cae7748d675e35bfb89b81349624258bc76fac1a)
Diffstat (limited to 'source4/libcli/namequery_dc.c')
-rw-r--r-- | source4/libcli/namequery_dc.c | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/source4/libcli/namequery_dc.c b/source4/libcli/namequery_dc.c index 130a924b0e..49aa42a744 100644 --- a/source4/libcli/namequery_dc.c +++ b/source4/libcli/namequery_dc.c @@ -25,80 +25,3 @@ #include "includes.h" -/* - find the DC for a domain using methods appropriate for a RPC domain -*/ -BOOL rpc_find_dc(const char *domain, fstring srv_name, struct ipv4_addr *ip_out) -{ - struct ipv4_addr *ip_list = NULL, dc_ip, exclude_ip; - int count, i; - BOOL list_ordered; - BOOL use_pdc_only; - - zero_ip(&exclude_ip); - - use_pdc_only = must_use_pdc(domain); - - /* Lookup domain controller name */ - - if ( use_pdc_only && get_pdc_ip(domain, &dc_ip) ) { - DEBUG(10,("rpc_find_dc: Atempting to lookup PDC to avoid sam sync delays\n")); - - if (name_status_find(domain, 0x1c, 0x20, dc_ip, srv_name)) { - goto done; - } - /* Didn't get name, remember not to talk to this DC. */ - exclude_ip = dc_ip; - } - - /* get a list of all domain controllers */ - - if (!get_dc_list( domain, &ip_list, &count, &list_ordered) ) { - DEBUG(3, ("Could not look up dc's for domain %s\n", domain)); - return False; - } - - /* Remove the entry we've already failed with (should be the PDC). */ - - if ( use_pdc_only ) { - for (i = 0; i < count; i++) { - if (ipv4_equal( exclude_ip, ip_list[i])) - zero_ip(&ip_list[i]); - } - } - - /* Pick a nice close server, but only if the list was not ordered */ - if (!list_ordered && (count > 1) ) { - qsort(ip_list, count, sizeof(struct ipv4_addr), QSORT_CAST ip_compare); - } - - for (i = 0; i < count; i++) { - if (is_zero_ip(ip_list[i])) - continue; - - if (name_status_find(domain, 0x1c, 0x20, ip_list[i], srv_name)) { - dc_ip = ip_list[i]; - goto done; - } - } - - - SAFE_FREE(ip_list); - - return False; -done: - /* We have the netbios name and IP address of a domain controller. - Ideally we should sent a SAMLOGON request to determine whether - the DC is alive and kicking. If we can catch a dead DC before - performing a smbcli_connect() we can avoid a 30-second timeout. */ - - DEBUG(3, ("rpc_find_dc: Returning DC %s (%s) for domain %s\n", srv_name, - inet_ntoa(dc_ip), domain)); - - *ip_out = dc_ip; - - SAFE_FREE(ip_list); - - return True; -} - |