diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-01-06 14:53:30 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-03-24 17:34:52 +0100 |
commit | 44ce126b84d88eb8b3e84996f0292ae768f88b4f (patch) | |
tree | d6a94da7182faa8a56c0c8e0e8097470e1d2f8f0 /source4/auth | |
parent | 40395eee5b8a58e980b46a797042fb86ed4b63d8 (diff) | |
download | samba-44ce126b84d88eb8b3e84996f0292ae768f88b4f.tar.gz samba-44ce126b84d88eb8b3e84996f0292ae768f88b4f.tar.bz2 samba-44ce126b84d88eb8b3e84996f0292ae768f88b4f.zip |
s4:ntlmssp: move doing_ntlm2 to ntlmssp_server_auth_state
metze
Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source4/auth')
-rw-r--r-- | source4/auth/ntlmssp/ntlmssp.h | 2 | ||||
-rw-r--r-- | source4/auth/ntlmssp/ntlmssp_server.c | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/source4/auth/ntlmssp/ntlmssp.h b/source4/auth/ntlmssp/ntlmssp.h index a47a71b66e..9e41d77664 100644 --- a/source4/auth/ntlmssp/ntlmssp.h +++ b/source4/auth/ntlmssp/ntlmssp.h @@ -127,8 +127,6 @@ struct ntlmssp_state */ NTSTATUS (*check_password)(struct ntlmssp_state *ntlmssp_state, DATA_BLOB *nt_session_key, DATA_BLOB *lm_session_key); - bool doing_ntlm2; - union { /* NTLM */ struct { diff --git a/source4/auth/ntlmssp/ntlmssp_server.c b/source4/auth/ntlmssp/ntlmssp_server.c index 30077010bc..fc7d6d7803 100644 --- a/source4/auth/ntlmssp/ntlmssp_server.c +++ b/source4/auth/ntlmssp/ntlmssp_server.c @@ -225,6 +225,7 @@ struct ntlmssp_server_auth_state { DATA_BLOB lm_session_key; /* internal variables used by KEY_EXCH (client-supplied user session key */ DATA_BLOB encrypted_session_key; + bool doing_ntlm2; /* internal variables used by NTLM2 */ uint8_t session_nonce[16]; }; @@ -349,7 +350,7 @@ static NTSTATUS ntlmssp_server_preauth(struct ntlmssp_state *ntlmssp_state, SMB_ASSERT(ntlmssp_state->internal_chal.data && ntlmssp_state->internal_chal.length == 8); - ntlmssp_state->doing_ntlm2 = true; + state->doing_ntlm2 = true; memcpy(state->session_nonce, ntlmssp_state->internal_chal.data, 8); memcpy(&state->session_nonce[8], ntlmssp_state->lm_resp.data, 8); @@ -410,7 +411,7 @@ static NTSTATUS ntlmssp_server_postauth(struct gensec_security *gensec_security, dump_data_pw("LM first-8:\n", lm_session_key->data, lm_session_key->length); /* Handle the different session key derivation for NTLM2 */ - if (ntlmssp_state->doing_ntlm2) { + if (state->doing_ntlm2) { if (user_session_key && user_session_key->data && user_session_key->length == 16) { session_key = data_blob_talloc(ntlmssp_state, NULL, 16); hmac_md5(user_session_key->data, state->session_nonce, |