summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2022-03-03 23:14:38 +0100
committerJule Anger <janger@samba.org>2022-03-16 13:41:14 +0000
commit6841fdef65bbe62260f9eb200d00742e3aef1a8f (patch)
tree72a6ed3d877154747ed8e7699d9ff26f7a7bd4f9
parent9898afd747f790521cacca91e64bb9e9838b8817 (diff)
downloadsamba-6841fdef65bbe62260f9eb200d00742e3aef1a8f.tar.gz
s4:auth: encrypt_user_info() should set password_state instead of mapped_state
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)
-rw-r--r--source4/auth/ntlm/auth_util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/auth/ntlm/auth_util.c b/source4/auth/ntlm/auth_util.c
index a0d061dca2a..58e97fb4a77 100644
--- a/source4/auth/ntlm/auth_util.c
+++ b/source4/auth/ntlm/auth_util.c
@@ -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,