diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-05-15 23:40:22 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:16:45 -0500 |
commit | 8f96c42027d282eec047d1b25951a33bc2fce71f (patch) | |
tree | d45e625f98091b3ad269faabaaad2f35cfd7443e /source4/auth/ntlmssp | |
parent | ffb8ba8cd320b7c25dabb2353d9e7245bcaefcd1 (diff) | |
download | samba-8f96c42027d282eec047d1b25951a33bc2fce71f.tar.gz samba-8f96c42027d282eec047d1b25951a33bc2fce71f.tar.bz2 samba-8f96c42027d282eec047d1b25951a33bc2fce71f.zip |
r6799: Remove a rudundent variable from the context structure - we can figure
this out by asking GENSEC, just like everybody else.
Andrew Bartlett
(This used to be commit 0268d6c46b73bf2097247639df2532b5e8591531)
Diffstat (limited to 'source4/auth/ntlmssp')
-rw-r--r-- | source4/auth/ntlmssp/ntlmssp.h | 2 | ||||
-rw-r--r-- | source4/auth/ntlmssp/ntlmssp_server.c | 6 | ||||
-rw-r--r-- | source4/auth/ntlmssp/ntlmssp_sign.c | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/source4/auth/ntlmssp/ntlmssp.h b/source4/auth/ntlmssp/ntlmssp.h index 9d6b827fbc..36d12a9820 100644 --- a/source4/auth/ntlmssp/ntlmssp.h +++ b/source4/auth/ntlmssp/ntlmssp.h @@ -87,8 +87,6 @@ struct gensec_ntlmssp_state BOOL allow_lm_key; /* The LM_KEY code is not functional at this point, and it's not very secure anyway */ - BOOL server_use_session_keys; /* Set to 'False' for authentication only, - that will never return a session key */ BOOL server_multiple_authentications; /* Set to 'True' to allow squid 2.5 style 'challenge caching' */ diff --git a/source4/auth/ntlmssp/ntlmssp_server.c b/source4/auth/ntlmssp/ntlmssp_server.c index db169684d6..bbe9b213f9 100644 --- a/source4/auth/ntlmssp/ntlmssp_server.c +++ b/source4/auth/ntlmssp/ntlmssp_server.c @@ -560,11 +560,12 @@ NTSTATUS ntlmssp_server_auth(struct gensec_security *gensec_security, /* Finally, actually ask if the password is OK */ if (!NT_STATUS_IS_OK(nt_status = gensec_ntlmssp_state->check_password(gensec_ntlmssp_state, - &user_session_key, &lm_session_key))) { + &user_session_key, &lm_session_key))) { return nt_status; } - if (gensec_ntlmssp_state->server_use_session_keys) { + if (gensec_security->want_features + & (GENSEC_FEATURE_SIGN|GENSEC_FEATURE_SEAL|GENSEC_FEATURE_SESSION_KEY)) { return ntlmssp_server_postauth(gensec_security, &user_session_key, &lm_session_key); } else { gensec_ntlmssp_state->session_key = data_blob(NULL, 0); @@ -715,7 +716,6 @@ NTSTATUS gensec_ntlmssp_server_start(struct gensec_security *gensec_security) gensec_ntlmssp_state->allow_lm_key = (lp_lanman_auth() && lp_parm_bool(-1, "ntlmssp_server", "allow_lm_key", False)); - gensec_ntlmssp_state->server_use_session_keys = True; gensec_ntlmssp_state->server_multiple_authentications = False; gensec_ntlmssp_state->neg_flags = diff --git a/source4/auth/ntlmssp/ntlmssp_sign.c b/source4/auth/ntlmssp/ntlmssp_sign.c index d8a5a0f909..960841ecf2 100644 --- a/source4/auth/ntlmssp/ntlmssp_sign.c +++ b/source4/auth/ntlmssp/ntlmssp_sign.c @@ -137,7 +137,7 @@ NTSTATUS gensec_ntlmssp_sign_packet(struct gensec_security *gensec_security, } if (!(gensec_security->want_features & GENSEC_FEATURE_SIGN)) { - DEBUG(3, ("GENSEC Signing not requested - cannot seal packet!\n")); + DEBUG(3, ("GENSEC Signing not requested - cannot sign packet!\n")); return NT_STATUS_INVALID_PARAMETER; } |