s3:ntlmssp Redirect lp_lanman_auth() via 'allow_lm_key'
authorAndrew Bartlett <abartlet@samba.org>
Fri, 6 Aug 2010 08:18:51 +0000 (18:18 +1000)
committerGünther Deschner <gd@samba.org>
Tue, 10 Aug 2010 10:13:00 +0000 (12:13 +0200)
This will allow this to be handled via common code in the future

Andrew Bartlett

Signed-off-by: Günther Deschner <gd@samba.org>
source3/libsmb/ntlmssp.c

index 784a34780301219575a7d5890e46ca22753f5614..906d743b919b17fdf10439b6ccf39caa256fc9dd 100644 (file)
@@ -325,7 +325,7 @@ static NTSTATUS ntlmssp_server_negotiate(struct ntlmssp_state *ntlmssp_state,
                }
        }
 
-       ntlmssp_handle_neg_flags(ntlmssp_state, neg_flags, lp_lanman_auth());
+       ntlmssp_handle_neg_flags(ntlmssp_state, neg_flags, ntlmssp_state->allow_lm_key);
 
        /* Ask our caller what challenge they would like in the packet */
        status = ntlmssp_state->get_challenge(ntlmssp_state, cryptkey);
@@ -518,7 +518,7 @@ static NTSTATUS ntlmssp_server_auth(struct ntlmssp_state *ntlmssp_state,
        }
 
        if (auth_flags)
-               ntlmssp_handle_neg_flags(ntlmssp_state, auth_flags, lp_lanman_auth());
+               ntlmssp_handle_neg_flags(ntlmssp_state, auth_flags, ntlmssp_state->allow_lm_key);
 
        if (DEBUGLEVEL >= 10) {
                struct AUTHENTICATE_MESSAGE *authenticate = talloc(
@@ -744,6 +744,8 @@ NTSTATUS ntlmssp_server_start(TALLOC_CTX *mem_ctx,
 
        ntlmssp_state->expected_state = NTLMSSP_NEGOTIATE;
 
+       ntlmssp_state->allow_lm_key = lp_lanman_auth();
+
        ntlmssp_state->neg_flags =
                NTLMSSP_NEGOTIATE_128 |
                NTLMSSP_NEGOTIATE_56 |