From: Andreas Schneider Date: Tue, 15 Mar 2022 12:10:06 +0000 (+0100) Subject: s3:libads: Fix creating local krb5.conf X-Git-Tag: tevent-0.12.0~442 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68d181ee676e17a5cdcfc12c5cc7eef242fdfa6c;p=thirdparty%2Fsamba.git s3:libads: Fix creating local krb5.conf 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 Reviewed-by: Guenther Deschner Autobuild-User(master): Günther Deschner Autobuild-Date(master): Wed Mar 16 14:26:36 UTC 2022 on sn-devel-184 --- diff --git a/source3/libads/kerberos.c b/source3/libads/kerberos.c index 20dceeefb22..3fd86e87064 100644 --- a/source3/libads/kerberos.c +++ b/source3/libads/kerberos.c @@ -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; }