From eeb79875c6edc82bfcaa8ed5d0eade77d64f7e8d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pavel=20Filipensk=C3=BD?= Date: Tue, 13 Feb 2024 13:43:50 +0100 Subject: [PATCH] s3:libnet: Sync keytab during libnet_join_create_keytab() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit BUG: https://bugzilla.samba.org/show_bug.cgi?id=6750 Signed-off-by: Pavel Filipenský Reviewed-by: Stefan Metzmacher --- source3/libnet/libnet_join.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c index 490f8ea37ab..d49d54436bb 100644 --- a/source3/libnet/libnet_join.c +++ b/source3/libnet/libnet_join.c @@ -859,15 +859,9 @@ static ADS_STATUS libnet_join_set_etypes(TALLOC_CTX *mem_ctx, static bool libnet_join_create_keytab(TALLOC_CTX *mem_ctx, struct libnet_JoinCtx *r) { - if (!USE_SYSTEM_KEYTAB) { - return true; - } + NTSTATUS ntstatus = sync_pw2keytabs(); - if (ads_keytab_create_default(r->in.ads) != 0) { - return false; - } - - return true; + return NT_STATUS_IS_OK(ntstatus); } /**************************************************************** -- 2.47.3