From b59de9e5eeb3f2f1c33e65604f8ea3fd00cdcdae Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 8 Sep 2020 18:07:28 -0700 Subject: [PATCH] s3: libsmb: Rename get_sorted_dc_list_sa() -> get_sorted_dc_list(). Everyone now uses samba_sockaddr arrays. Signed-off-by: Jeremy Allison Reviewed-by: Noel Power --- source3/libads/ldap.c | 4 ++-- source3/libsmb/namequery.c | 2 +- source3/libsmb/namequery.h | 2 +- source3/libsmb/namequery_dc.c | 2 +- source3/utils/net_lookup.c | 2 +- source3/winbindd/winbindd_cm.c | 10 +++++----- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 0217e38d406..f7f0ee43213 100755 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -393,7 +393,7 @@ static NTSTATUS resolve_and_ping_netbios(ADS_STRUCT *ads, DEBUG(6, ("resolve_and_ping_netbios: (cldap) looking for domain '%s'\n", domain)); - status = get_sorted_dc_list_sa(talloc_tos(), + status = get_sorted_dc_list(talloc_tos(), domain, NULL, &sa_list, @@ -444,7 +444,7 @@ static NTSTATUS resolve_and_ping_dns(ADS_STRUCT *ads, const char *sitename, DEBUG(6, ("resolve_and_ping_dns: (cldap) looking for realm '%s'\n", realm)); - status = get_sorted_dc_list_sa(talloc_tos(), + status = get_sorted_dc_list(talloc_tos(), realm, sitename, &sa_list, diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index a772d57b670..de236cff0d1 100644 --- a/source3/libsmb/namequery.c +++ b/source3/libsmb/namequery.c @@ -4154,7 +4154,7 @@ static NTSTATUS get_dc_list(TALLOC_CTX *ctx, Returns a samba_sockaddr array. *********************************************************************/ -NTSTATUS get_sorted_dc_list_sa(TALLOC_CTX *ctx, +NTSTATUS get_sorted_dc_list(TALLOC_CTX *ctx, const char *domain, const char *sitename, struct samba_sockaddr **sa_list_ret, diff --git a/source3/libsmb/namequery.h b/source3/libsmb/namequery.h index 5dcdaa9f672..2342c5a2164 100644 --- a/source3/libsmb/namequery.h +++ b/source3/libsmb/namequery.h @@ -110,7 +110,7 @@ NTSTATUS resolve_name_list(TALLOC_CTX *ctx, unsigned int *p_num_entries); bool find_master_ip(const char *group, struct sockaddr_storage *master_ss); bool get_pdc_ip(const char *domain, struct sockaddr_storage *pss); -NTSTATUS get_sorted_dc_list_sa(TALLOC_CTX *ctx, +NTSTATUS get_sorted_dc_list(TALLOC_CTX *ctx, const char *domain, const char *sitename, struct samba_sockaddr **sa_list_ret, diff --git a/source3/libsmb/namequery_dc.c b/source3/libsmb/namequery_dc.c index 75377ce79ce..03eea8a10a8 100644 --- a/source3/libsmb/namequery_dc.c +++ b/source3/libsmb/namequery_dc.c @@ -173,7 +173,7 @@ static bool rpc_dc_name(const char *domain, /* get a list of all domain controllers */ - result = get_sorted_dc_list_sa(talloc_tos(), + result = get_sorted_dc_list(talloc_tos(), domain, NULL, &sa_list, diff --git a/source3/utils/net_lookup.c b/source3/utils/net_lookup.c index 46acd31f379..030296aba37 100644 --- a/source3/utils/net_lookup.c +++ b/source3/utils/net_lookup.c @@ -214,7 +214,7 @@ static int net_lookup_dc(struct net_context *c, int argc, const char **argv) d_printf("%s\n", pdc_str); sitename = sitename_fetch(talloc_tos(), domain); - status = get_sorted_dc_list_sa(talloc_tos(), + status = get_sorted_dc_list(talloc_tos(), domain, sitename, &sa_list, diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index 929b00fa1ee..344eac2804b 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -1563,7 +1563,7 @@ static bool get_dcs(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain, /* We need to make sure we know the local site before doing any DNS queries, as this will restrict the - get_sorted_dc_list_sa() call below to only fetching + get_sorted_dc_list() call below to only fetching DNS records for the correct site. */ /* Find any DC to get the site record. @@ -1576,7 +1576,7 @@ static bool get_dcs(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain, if (sitename) { /* Do the site-specific AD dns lookup first. */ - (void)get_sorted_dc_list_sa(mem_ctx, + (void)get_sorted_dc_list(mem_ctx, domain->alt_name, sitename, &sa_list, @@ -1605,7 +1605,7 @@ static bool get_dcs(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain, } /* Now we add DCs from the main AD DNS lookup. */ - (void)get_sorted_dc_list_sa(mem_ctx, + (void)get_sorted_dc_list(mem_ctx, domain->alt_name, NULL, &sa_list, @@ -1631,7 +1631,7 @@ static bool get_dcs(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain, /* Try standard netbios queries if no ADS and fall back to DNS queries * if alt_name is available */ if (*num_dcs == 0) { - (void)get_sorted_dc_list_sa(mem_ctx, + (void)get_sorted_dc_list(mem_ctx, domain->name, NULL, &sa_list, @@ -1639,7 +1639,7 @@ static bool get_dcs(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain, false); if (salist_size == 0) { if (domain->alt_name != NULL) { - (void)get_sorted_dc_list_sa(mem_ctx, + (void)get_sorted_dc_list(mem_ctx, domain->alt_name, NULL, &sa_list, -- 2.47.3