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)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 9 Aug 2010 06:30:42 +0000 (16:30 +1000)
This will allow this to be handled via common code in the future

Andrew Bartlett

source3/libsmb/ntlmssp.c

index 784a34780301219575a7d5890e46ca22753f5614..995b7c2c5bc19a73140182e9ddab646934b44daf 100644 (file)
@@ -324,8 +324,8 @@ 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 |