s3-auth: Only allow LM_KEY cryptography when extra options are set
authorAndrew Bartlett <abartlet@samba.org>
Tue, 31 Jan 2012 04:38:02 +0000 (15:38 +1100)
committerStefan Metzmacher <metze@samba.org>
Fri, 17 Feb 2012 09:48:09 +0000 (10:48 +0100)
This crypto is incredibly poor, and can technically be enabled on an otherwise more
secure connection that uses NTLM for the actual authentication leg.  Therefore
disable it by default.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
source3/auth/auth_ntlmssp.c

index 36e7492..66d31d5 100644 (file)
@@ -262,7 +262,12 @@ static NTSTATUS gensec_ntlmssp3_server_start(struct gensec_security *gensec_secu
 
        ntlmssp_state->expected_state = NTLMSSP_NEGOTIATE;
 
-       ntlmssp_state->allow_lm_key = lp_lanman_auth();
+       if (lpcfg_lanman_auth(gensec_security->settings->lp_ctx) &&
+           gensec_setting_bool(gensec_security->settings,
+                               "ntlmssp_server", "allow_lm_key", false))
+       {
+               ntlmssp_state->allow_lm_key = true;
+       }
 
        ntlmssp_state->neg_flags =
                NTLMSSP_NEGOTIATE_128 |