summaryrefslogtreecommitdiff
path: root/source4/auth/ntlmssp
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-12-29 15:54:59 +0100
committerStefan Metzmacher <metze@samba.org>2009-12-29 17:06:24 +0100
commit7d4692fa43fd84a8251231781fba7f3f9e46c30b (patch)
tree46fa2bc0fc426933721e4611cb34e7b637482fac /source4/auth/ntlmssp
parentdea456089a7838219e7819bfb04a98e03f3d0002 (diff)
downloadsamba-7d4692fa43fd84a8251231781fba7f3f9e46c30b.tar.gz
samba-7d4692fa43fd84a8251231781fba7f3f9e46c30b.tar.bz2
samba-7d4692fa43fd84a8251231781fba7f3f9e46c30b.zip
s4:ntlmssp_server: clear session key in ntlmssp_server_preauth()
metze
Diffstat (limited to 'source4/auth/ntlmssp')
-rw-r--r--source4/auth/ntlmssp/ntlmssp_server.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/source4/auth/ntlmssp/ntlmssp_server.c b/source4/auth/ntlmssp/ntlmssp_server.c
index 7c165b8eea..7514b3234a 100644
--- a/source4/auth/ntlmssp/ntlmssp_server.c
+++ b/source4/auth/ntlmssp/ntlmssp_server.c
@@ -263,6 +263,7 @@ static NTSTATUS ntlmssp_server_preauth(struct gensec_ntlmssp_state *gensec_ntlms
}
/* zero these out */
+ data_blob_free(&gensec_ntlmssp_state->session_key);
data_blob_free(&gensec_ntlmssp_state->lm_resp);
data_blob_free(&gensec_ntlmssp_state->nt_resp);
data_blob_free(&gensec_ntlmssp_state->encrypted_session_key);
@@ -575,15 +576,12 @@ NTSTATUS ntlmssp_server_auth(struct gensec_security *gensec_security,
return nt_status;
}
- gensec_ntlmssp_state->session_key = data_blob_null;
-
if (gensec_security->want_features
& (GENSEC_FEATURE_SIGN|GENSEC_FEATURE_SEAL|GENSEC_FEATURE_SESSION_KEY)) {
nt_status = ntlmssp_server_postauth(gensec_security, &user_session_key, &lm_session_key);
talloc_free(mem_ctx);
return nt_status;
} else {
- gensec_ntlmssp_state->session_key = data_blob(NULL, 0);
talloc_free(mem_ctx);
return NT_STATUS_OK;
}