]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: utils: Make net_lookup_dc() use get_sorted_dc_list_sa().
authorJeremy Allison <jra@samba.org>
Tue, 8 Sep 2020 23:31:18 +0000 (16:31 -0700)
committerNoel Power <npower@samba.org>
Tue, 15 Sep 2020 10:09:38 +0000 (10:09 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
source3/utils/net_lookup.c

index 1476e0aa95f8b26d740eb83add25bf259c00b2ba..46acd31f3798a166bf7d7d93add1486ce98e9d64 100644 (file)
@@ -183,7 +183,7 @@ static int net_lookup_ldap(struct net_context *c, int argc, const char **argv)
 
 static int net_lookup_dc(struct net_context *c, int argc, const char **argv)
 {
-       struct ip_service *ip_list = NULL;
+       struct samba_sockaddr *sa_list = NULL;
        struct sockaddr_storage ss;
        char *pdc_str = NULL;
        const char *domain = NULL;
@@ -214,10 +214,10 @@ 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(talloc_tos(),
+       status = get_sorted_dc_list_sa(talloc_tos(),
                                domain,
                                sitename,
-                               &ip_list,
+                               &sa_list,
                                &count,
                                sec_ads);
        if (!NT_STATUS_IS_OK(status)) {
@@ -227,11 +227,11 @@ static int net_lookup_dc(struct net_context *c, int argc, const char **argv)
        }
        TALLOC_FREE(sitename);
        for (i=0;i<count;i++) {
-               print_sockaddr(addr, sizeof(addr), &ip_list[i].ss);
+               print_sockaddr(addr, sizeof(addr), &sa_list[i].u.ss);
                if (!strequal(pdc_str, addr))
                        d_printf("%s\n", addr);
        }
-       TALLOC_FREE(ip_list);
+       TALLOC_FREE(sa_list);
        SAFE_FREE(pdc_str);
        return 0;
 }