From: Jeremy Allison Date: Tue, 8 Sep 2020 23:36:40 +0000 (-0700) Subject: s3: libads: Make resolve_and_ping_dns() use get_sorted_dc_list_sa(). X-Git-Tag: talloc-2.3.2~512 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5a448e96ace9a6f42f09d1e9915580f3557e21cd;p=thirdparty%2Fsamba.git s3: libads: Make resolve_and_ping_dns() use get_sorted_dc_list_sa(). We no longer use cldap_ping_list(), comment it out for removal. Signed-off-by: Jeremy Allison Reviewed-by: Noel Power --- diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 12cbe58acbb..2a0c5f13219 100755 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -340,6 +340,7 @@ static bool ads_try_connect(ADS_STRUCT *ads, bool gc, return ret; } +#if 0 /********************************************************************** send a cldap ping to list of servers, one at a time, until one of them answers it's an ldap server. Record success in the ADS_STRUCT. @@ -377,6 +378,7 @@ static NTSTATUS cldap_ping_list(ADS_STRUCT *ads, return NT_STATUS_NO_LOGON_SERVERS; } +#endif /********************************************************************** send a cldap ping to list of servers, one at a time, until one of @@ -476,26 +478,26 @@ static NTSTATUS resolve_and_ping_dns(ADS_STRUCT *ads, const char *sitename, const char *realm) { size_t count = 0; - struct ip_service *ip_list = NULL; + struct samba_sockaddr *sa_list = NULL; NTSTATUS status; DEBUG(6, ("resolve_and_ping_dns: (cldap) looking for realm '%s'\n", realm)); - status = get_sorted_dc_list(talloc_tos(), + status = get_sorted_dc_list_sa(talloc_tos(), realm, sitename, - &ip_list, + &sa_list, &count, true); if (!NT_STATUS_IS_OK(status)) { - TALLOC_FREE(ip_list); + TALLOC_FREE(sa_list); return status; } - status = cldap_ping_list(ads, realm, ip_list, count); + status = cldap_ping_list_sa(ads, realm, sa_list, count); - TALLOC_FREE(ip_list); + TALLOC_FREE(sa_list); return status; }