]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:auth: let auth_context_create_for_netlogon() remember for_netlogon = true;
authorStefan Metzmacher <metze@samba.org>
Fri, 21 Mar 2025 17:34:03 +0000 (18:34 +0100)
committerRalph Boehme <slow@samba.org>
Thu, 3 Apr 2025 09:36:31 +0000 (09:36 +0000)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
auth/common_auth.h
source4/auth/ntlm/auth.c

index ef507211453d52f24493f638dfe64e4be03cce3d..97f1323d2ee0b296be7f544e9375af82aeaf9553 100644 (file)
@@ -136,6 +136,8 @@ struct auth4_context {
        /* Kerberos context, set up on demand */
        struct smb_krb5_context *smb_krb5_context;
 
+       bool for_netlogon;
+
        struct tevent_req *(*check_ntlm_password_send)(TALLOC_CTX *mem_ctx,
                                        struct tevent_context *ev,
                                        struct auth4_context *auth_ctx,
index 3ad18bd2989d65410f01a8918af0f51b2ecde2ff..9416dfa6380614323c7190088016fd0dcb3a981e 100644 (file)
@@ -772,7 +772,12 @@ _PUBLIC_ NTSTATUS auth_context_create_for_netlogon(TALLOC_CTX *mem_ctx,
        status = auth_context_create_methods(mem_ctx, auth_methods, ev, msg,
                                             lp_ctx, NULL, auth_ctx);
        talloc_free(_auth_methods);
-       return status;
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       (*auth_ctx)->for_netlogon = true;
+       return NT_STATUS_OK;
 }
 
 /* the list of currently registered AUTH backends */