s3:libads: Fix creating local krb5.conf
authorAndreas Schneider <asn@samba.org>
Tue, 15 Mar 2022 12:10:06 +0000 (13:10 +0100)
committerGünther Deschner <gd@samba.org>
Wed, 16 Mar 2022 14:26:36 +0000 (14:26 +0000)
We create an KDC ip string entry directly at the beginning, use it if we
don't have any additional DCs.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15016

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Mar 16 14:26:36 UTC 2022 on sn-devel-184

source3/libads/kerberos.c

index 20dceeefb22def1a6a3215a4d95a0942c39038c1..3fd86e87064ea871200f8e4c3ff8f37cbddee644 100644 (file)
@@ -522,6 +522,11 @@ static char *get_kdc_ip_string(char *mem_ctx,
 
        DBG_DEBUG("%zu additional KDCs to test\n", num_dcs);
        if (num_dcs == 0) {
+               /*
+                * We do not have additional KDCs, but we have the one passed
+                * in via `pss`. So just use that one and leave.
+                */
+               result = talloc_move(mem_ctx, &kdc_str);
                goto out;
        }