]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:auth: rename user_info->mapped_state to user_info->cracknames_called
authorStefan Metzmacher <metze@samba.org>
Thu, 3 Mar 2022 10:10:00 +0000 (11:10 +0100)
committerJule Anger <janger@samba.org>
Wed, 16 Mar 2022 14:27:12 +0000 (14:27 +0000)
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)

auth/common_auth.h
source4/auth/ntlm/auth_sam.c
source4/auth/ntlm/auth_simple.c

index 0452c673ebcec7c0b14ec30a74de3f60b41f0df3..9d51ea69719b3346f1266cd90137595d2f623e07 100644 (file)
@@ -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 */
index 673f900b0c6b764ab517d02185352b54da1d1278..cf0656ae0da15dc2417b8de76481cf2d985dcfc1 100644 (file)
@@ -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.
                 */
index f767adb36960e0b6c509759d775badff714fbc65..4f8267e92857c3eb0ee93772794eda98e88ee824 100644 (file)
@@ -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,