diff options
author | Stefan Metzmacher <metze@samba.org> | 2008-09-11 06:40:26 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-09-23 11:30:01 +0200 |
commit | 23e31350f5ba23b0b995ff3d14bfbff50cdece6c (patch) | |
tree | e5c7f9884d9b2a135e8dfa04c2c58b6d764d28a2 /source4/auth/ntlmssp | |
parent | 70b0c8f79a427a3227ce01bc930870771076bff7 (diff) | |
download | samba-23e31350f5ba23b0b995ff3d14bfbff50cdece6c.tar.gz samba-23e31350f5ba23b0b995ff3d14bfbff50cdece6c.tar.bz2 samba-23e31350f5ba23b0b995ff3d14bfbff50cdece6c.zip |
ntlmssp: only give away the session key, when the authentication is done
metze
Diffstat (limited to 'source4/auth/ntlmssp')
-rw-r--r-- | source4/auth/ntlmssp/ntlmssp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/auth/ntlmssp/ntlmssp.c b/source4/auth/ntlmssp/ntlmssp.c index 0b7f0da9af..cea18c45a7 100644 --- a/source4/auth/ntlmssp/ntlmssp.c +++ b/source4/auth/ntlmssp/ntlmssp.c @@ -235,6 +235,10 @@ NTSTATUS gensec_ntlmssp_session_key(struct gensec_security *gensec_security, { struct gensec_ntlmssp_state *gensec_ntlmssp_state = (struct gensec_ntlmssp_state *)gensec_security->private_data; + if (gensec_ntlmssp_state->expected_state != NTLMSSP_DONE) { + return NT_STATUS_NO_USER_SESSION_KEY; + } + if (!gensec_ntlmssp_state->session_key.data) { return NT_STATUS_NO_USER_SESSION_KEY; } |