summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-09-11 06:40:26 +0200
committerStefan Metzmacher <metze@samba.org>2008-09-23 11:30:01 +0200
commit23e31350f5ba23b0b995ff3d14bfbff50cdece6c (patch)
treee5c7f9884d9b2a135e8dfa04c2c58b6d764d28a2 /source4
parent70b0c8f79a427a3227ce01bc930870771076bff7 (diff)
downloadsamba-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')
-rw-r--r--source4/auth/ntlmssp/ntlmssp.c4
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;
}