]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:auth/ntlm: let authsam_check_password_internals() add NETLOGON_NTLMV2_ENABLED
authorStefan Metzmacher <metze@samba.org>
Wed, 15 Jan 2025 10:57:12 +0000 (11:57 +0100)
committerJule Anger <janger@samba.org>
Mon, 3 Feb 2025 18:51:14 +0000 (18:51 +0000)
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 <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 1414004ee953975c50e0ee374684ff8e01246946)

source4/auth/ntlm/auth_sam.c

index e3eef793cd135a0b043fde1a38dd93d795e55037..4657720316a55a7cba86d58f8c556e7270539e7e 100644 (file)
@@ -1124,6 +1124,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,