diff options
author | Stefan Metzmacher <metze@samba.org> | 2022-03-03 23:14:10 +0100 |
---|---|---|
committer | Jule Anger <janger@samba.org> | 2022-03-16 13:41:14 +0000 |
commit | e691165b4de1466a11fe8288c1601ced31b9f1ff (patch) | |
tree | e7075287e856d79dea2247ccbff595e28900a1b5 | |
parent | 03996701fb5421916eba5616be2cf3fa2041b450 (diff) | |
download | samba-e691165b4de1466a11fe8288c1601ced31b9f1ff.tar.gz |
s4:auth: check for user_info->mapped.account_name if it needs to be filled
mapped_state is a special hack for authenticate_ldap_simple_bind_send()
in order to avoid some additional work in authsam_check_password_internals().
But that code will be changed in the next commits, so we can simplify
the logic and only check for user_info->mapped.account_name being NULL.
As it's the important factor that user_info->mapped.account_name is
non-NULL down in the auth stack.
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 c7b8c71b2b71bb9d95c33d403c4204376f443852)
-rw-r--r-- | source4/auth/ntlm/auth.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/source4/auth/ntlm/auth.c b/source4/auth/ntlm/auth.c index 3dd2ffc9276..09d660a392b 100644 --- a/source4/auth/ntlm/auth.c +++ b/source4/auth/ntlm/auth.c @@ -220,17 +220,12 @@ _PUBLIC_ struct tevent_req *auth_check_password_send(TALLOC_CTX *mem_ctx, state->user_info = user_info; state->authoritative = 1; - if (!user_info->mapped_state) { + if (user_info->mapped.account_name == NULL) { struct auth_usersupplied_info *user_info_tmp; /* * We don't really do any mapping here. * - * So we don't set user_info->mapped_state, - * but we set mapped.domain_name and - * mapped.account_name to the client - * provided values. - * * It's up to the backends to do mappings * for their authentication. */ |