]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:libnet: Sync keytab during libnet_join_create_keytab()
authorPavel Filipenský <pfilipensky@samba.org>
Tue, 13 Feb 2024 12:43:50 +0000 (13:43 +0100)
committerPavel Filipensky <pfilipensky@samba.org>
Fri, 26 Jul 2024 17:12:36 +0000 (17:12 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=6750

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/libnet/libnet_join.c

index 490f8ea37ab77c775b3433db6455ec4c848e6ff4..d49d54436bb567948ef7b087dadaf9a720fffc3c 100644 (file)
@@ -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);
 }
 
 /****************************************************************