]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:auth: encrypt_user_info() should set password_state instead of mapped_state
authorStefan Metzmacher <metze@samba.org>
Thu, 3 Mar 2022 22:14:38 +0000 (23:14 +0100)
committerJule Anger <janger@samba.org>
Wed, 16 Mar 2022 14:27:11 +0000 (14:27 +0000)
user_info->mapped_state has nothing to do with enum auth_password_state,
user_info->password_state is the one that holds the auth_password_state value.

Luckily user_info->password_state was never referenced in the
encrypt_user_info() callers.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13879

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit a6fb598d9dcbfe21ef285b5f30fabcb88a259c93)

source4/auth/ntlm/auth_util.c

index a0d061dca2a6af911d08735d07bbf2656bfaa5f6..58e97fb4a771d00d09572ec60a30d8ff525d6976 100644 (file)
@@ -73,7 +73,7 @@ NTSTATUS encrypt_user_info(TALLOC_CTX *mem_ctx, struct auth4_context *auth_conte
                                return NT_STATUS_NO_MEMORY;
                        }
                        *user_info_temp = *user_info_in;
-                       user_info_temp->mapped_state = to_state;
+                       user_info_temp->password_state = to_state;
                        
                        nt_status = auth_get_challenge(auth_context, chal);
                        if (!NT_STATUS_IS_OK(nt_status)) {
@@ -147,7 +147,7 @@ NTSTATUS encrypt_user_info(TALLOC_CTX *mem_ctx, struct auth4_context *auth_conte
                                return NT_STATUS_NO_MEMORY;
                        }
                        *user_info_temp = *user_info_in;
-                       user_info_temp->mapped_state = to_state;
+                       user_info_temp->password_state = to_state;
                        
                        if (E_deshash(user_info_in->password.plaintext, lanman.hash)) {
                                user_info_temp->password.hash.lanman = talloc(user_info_temp,