From: Stefan Metzmacher Date: Fri, 21 Mar 2025 17:34:03 +0000 (+0100) Subject: s4:auth: let auth_context_create_for_netlogon() remember for_netlogon = true; X-Git-Tag: tevent-0.17.0~368 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74d44f50291dc58fdd3897b6e2ee075c585bd3bf;p=thirdparty%2Fsamba.git s4:auth: let auth_context_create_for_netlogon() remember for_netlogon = true; Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme --- diff --git a/auth/common_auth.h b/auth/common_auth.h index ef507211453..97f1323d2ee 100644 --- a/auth/common_auth.h +++ b/auth/common_auth.h @@ -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, diff --git a/source4/auth/ntlm/auth.c b/source4/auth/ntlm/auth.c index 3ad18bd2989..9416dfa6380 100644 --- a/source4/auth/ntlm/auth.c +++ b/source4/auth/ntlm/auth.c @@ -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 */