From d5a2358e3eb05af9c206ce61edeaf344ca02c511 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 15 Jan 2025 11:57:12 +0100 Subject: [PATCH] s4:auth/ntlm: let authsam_check_password_internals() add NETLOGON_NTLMV2_ENABLED Windows returns NETLOGON_NTLMV2_ENABLED in all netr_LogonSamLogon* response messages. Even if NTLMv1 was actually used and also for password authentication. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15783 Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider (cherry picked from commit 1414004ee953975c50e0ee374684ff8e01246946) --- source4/auth/ntlm/auth_sam.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source4/auth/ntlm/auth_sam.c b/source4/auth/ntlm/auth_sam.c index d12045d8e1c..35728244a8b 100644 --- a/source4/auth/ntlm/auth_sam.c +++ b/source4/auth/ntlm/auth_sam.c @@ -1090,6 +1090,7 @@ static NTSTATUS authsam_check_password_internals(struct auth_method_context *ctx talloc_free(tmp_ctx); return nt_status; } + (*user_info_dc)->info->user_flags |= NETLOGON_NTLMV2_ENABLED; result = dsdb_is_protected_user(ctx->auth_ctx->sam_ctx, (*user_info_dc)->sids, -- 2.47.2