diff options
author | Stefan Metzmacher <metze@samba.org> | 2022-03-03 11:10:00 +0100 |
---|---|---|
committer | Jule Anger <janger@samba.org> | 2022-03-16 13:41:14 +0000 |
commit | f4e3909545013dafccba1e7ac22e3a78209b77ea (patch) | |
tree | 78ac9f12e1876009348bf80503e058330acf153b | |
parent | 1e617128adbb8eadf8e66473260b28a07894db30 (diff) | |
download | samba-f4e3909545013dafccba1e7ac22e3a78209b77ea.tar.gz |
s4:auth: rename user_info->mapped_state to user_info->cracknames_called
This makes it much clearer what it is used for and
it is a special hack for authenticate_ldap_simple_bind_send()
in order to avoid some additional work in
authsam_check_password_internals().
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 427125d182252d8aee3dd906ee34a909cdbb8ef3)
-rw-r--r-- | auth/common_auth.h | 2 | ||||
-rw-r--r-- | source4/auth/ntlm/auth_sam.c | 4 | ||||
-rw-r--r-- | source4/auth/ntlm/auth_simple.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/auth/common_auth.h b/auth/common_auth.h index 0452c673ebc..9d51ea69719 100644 --- a/auth/common_auth.h +++ b/auth/common_auth.h @@ -49,7 +49,7 @@ struct auth_usersupplied_info uint32_t logon_parameters; - bool mapped_state; + bool cracknames_called; bool was_mapped; uint64_t logon_id; /* the values the client gives us */ diff --git a/source4/auth/ntlm/auth_sam.c b/source4/auth/ntlm/auth_sam.c index 673f900b0c6..cf0656ae0da 100644 --- a/source4/auth/ntlm/auth_sam.c +++ b/source4/auth/ntlm/auth_sam.c @@ -658,7 +658,7 @@ static NTSTATUS authsam_check_password_internals(struct auth_method_context *ctx * really, really want to get back to exactly the same account * we got the DN for. */ - if (user_info->mapped_state == false) { + if (!user_info->cracknames_called) { p = strchr_m(account_name, '@'); } else { /* @@ -867,7 +867,7 @@ static NTSTATUS authsam_want_check(struct auth_method_context *ctx, return NT_STATUS_OK; } - if (user_info->mapped_state) { + if (user_info->cracknames_called) { /* * The caller already did a cracknames call. */ diff --git a/source4/auth/ntlm/auth_simple.c b/source4/auth/ntlm/auth_simple.c index f767adb3696..4f8267e9285 100644 --- a/source4/auth/ntlm/auth_simple.c +++ b/source4/auth/ntlm/auth_simple.c @@ -123,7 +123,7 @@ _PUBLIC_ struct tevent_req *authenticate_ldap_simple_bind_send(TALLOC_CTX *mem_c user_info->mapped.account_name = nt4_username; user_info->mapped.domain_name = nt4_domain; - user_info->mapped_state = true; + user_info->cracknames_called = true; subreq = auth_check_password_send(state, ev, state->auth_context, |