]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: libsmb: Remove get_sorted_dc_list().
authorJeremy Allison <jra@samba.org>
Wed, 26 Aug 2020 19:01:18 +0000 (12:01 -0700)
committerNoel Power <npower@samba.org>
Mon, 7 Sep 2020 13:23:41 +0000 (13:23 +0000)
No more callers.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
source3/libsmb/namequery.c
source3/libsmb/namequery.h

index 3d35c9d4cb6b103eafc84e559a096effda3a62d8..0f8e75331bad59170db77c0e3cfb4395fc5f47a3 100644 (file)
@@ -3962,57 +3962,6 @@ static NTSTATUS get_dc_list(const char *domain,
        return status;
 }
 
-/*********************************************************************
- Small wrapper function to get the DC list and sort it if neccessary.
-*********************************************************************/
-
-NTSTATUS get_sorted_dc_list( const char *domain,
-                       const char *sitename,
-                       struct ip_service **ip_list,
-                       int *count,
-                       bool ads_only )
-{
-       bool ordered = false;
-       NTSTATUS status;
-       enum dc_lookup_type lookup_type = DC_NORMAL_LOOKUP;
-
-       *ip_list = NULL;
-       *count = 0;
-
-       DEBUG(8,("get_sorted_dc_list: attempting lookup "
-               "for name %s (sitename %s)\n",
-               domain,
-                sitename ? sitename : "NULL"));
-
-       if (ads_only) {
-               lookup_type = DC_ADS_ONLY;
-       }
-
-       status = get_dc_list(domain, sitename, ip_list,
-                       count, lookup_type, &ordered);
-       if (NT_STATUS_EQUAL(status, NT_STATUS_NO_LOGON_SERVERS)
-           && sitename) {
-               DEBUG(3,("get_sorted_dc_list: no server for name %s available"
-                        " in site %s, fallback to all servers\n",
-                        domain, sitename));
-               status = get_dc_list(domain, NULL, ip_list,
-                                    count, lookup_type, &ordered);
-       }
-
-       if (!NT_STATUS_IS_OK(status)) {
-               SAFE_FREE(*ip_list);
-               *count = 0;
-               return status;
-       }
-
-       /* only sort if we don't already have an ordered list */
-       if (!ordered) {
-               sort_service_list(*ip_list, *count);
-       }
-
-       return NT_STATUS_OK;
-}
-
 /*********************************************************************
  Talloc version.
  Small wrapper function to get the DC list and sort it if neccessary.
index 9c4b2ecdf458513f494c32c2dcc10d90bd9124c8..1eb3f86f3c3e28552eae480f1ef198d24096b84a 100644 (file)
@@ -109,11 +109,6 @@ 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( const char *domain,
-                       const char *sitename,
-                       struct ip_service **ip_list,
-                       int *count,
-                       bool ads_only );
 NTSTATUS get_sorted_dc_list_talloc(TALLOC_CTX *ctx,
                        const char *domain,
                        const char *sitename,