]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: utils: Make net_lookup_kdc() use get_kdc_list_sa().
authorJeremy Allison <jra@samba.org>
Tue, 8 Sep 2020 23:11:47 +0000 (16:11 -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 ad4c2ff59d3b5c579a7b45e3a20eae0d9b392aa5..970ac7247099e9cf2b54d7a7db0553cde7275fb4 100644 (file)
@@ -287,7 +287,7 @@ static int net_lookup_kdc(struct net_context *c, int argc, const char **argv)
 #ifdef HAVE_KRB5
        krb5_error_code rc;
        krb5_context ctx;
-       struct ip_service *kdcs = NULL;
+       struct samba_sockaddr *kdcs = NULL;
        const char *realm;
        char **get_host_realms = NULL;
        size_t num_kdcs = 0;
@@ -316,13 +316,13 @@ static int net_lookup_kdc(struct net_context *c, int argc, const char **argv)
                realm = (const char *) *get_host_realms;
        }
 
-       status = get_kdc_list(talloc_tos(),
+       status = get_kdc_list_sa(talloc_tos(),
                                realm,
                                NULL,
                                &kdcs,
                                &num_kdcs);
        if (!NT_STATUS_IS_OK(status)) {
-               DBG_WARNING("get_kdc_list failed (%s)\n",
+               DBG_WARNING("get_kdc_list_sa failed (%s)\n",
                        nt_errstr(status));
                krb5_free_host_realm(ctx, get_host_realms);
                krb5_free_context(ctx);
@@ -332,9 +332,9 @@ static int net_lookup_kdc(struct net_context *c, int argc, const char **argv)
        for (i = 0; i < num_kdcs; i++) {
                char addr[INET6_ADDRSTRLEN];
 
-               print_sockaddr(addr, sizeof(addr), &kdcs[i].ss);
+               print_sockaddr(addr, sizeof(addr), &kdcs[i].u.ss);
 
-               d_printf("%s:%u\n", addr, kdcs[i].port);
+               d_printf("%s:88\n", addr);
        }
 
        krb5_free_host_realm(ctx, get_host_realms);