diff options
author | Stefan Metzmacher <metze@samba.org> | 2009-12-29 16:07:16 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2009-12-29 17:06:25 +0100 |
commit | 994d34b949cd68b692ca688f162652c924732e84 (patch) | |
tree | 136afa90958fa89cc9a229b26a082c55c06f8c69 | |
parent | 3f04b60fb9051f65074316b7704793759f4cbdf7 (diff) | |
download | samba-994d34b949cd68b692ca688f162652c924732e84.tar.gz samba-994d34b949cd68b692ca688f162652c924732e84.tar.bz2 samba-994d34b949cd68b692ca688f162652c924732e84.zip |
s4:ntlmssp_server: don't use a mem_ctx for ntlmssp_server_auth()
metze
-rw-r--r-- | source4/auth/ntlmssp/ntlmssp_server.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/source4/auth/ntlmssp/ntlmssp_server.c b/source4/auth/ntlmssp/ntlmssp_server.c index a6995aad8a..559cca0733 100644 --- a/source4/auth/ntlmssp/ntlmssp_server.c +++ b/source4/auth/ntlmssp/ntlmssp_server.c @@ -548,16 +548,11 @@ NTSTATUS ntlmssp_server_auth(struct gensec_security *gensec_security, DATA_BLOB lm_session_key = data_blob_null; NTSTATUS nt_status; - TALLOC_CTX *mem_ctx = talloc_new(out_mem_ctx); - if (!mem_ctx) { - return NT_STATUS_NO_MEMORY; - } - /* zero the outbound NTLMSSP packet */ *out = data_blob_null; - if (!NT_STATUS_IS_OK(nt_status = ntlmssp_server_preauth(gensec_ntlmssp_state, in))) { - talloc_free(mem_ctx); + nt_status = ntlmssp_server_preauth(gensec_ntlmssp_state, in); + if (!NT_STATUS_IS_OK(nt_status)) { return nt_status; } @@ -569,20 +564,19 @@ 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, mem_ctx, - &user_session_key, &lm_session_key))) { - talloc_free(mem_ctx); + nt_status = gensec_ntlmssp_state->check_password(gensec_ntlmssp_state, + NULL, + &user_session_key, + &lm_session_key); + if (!NT_STATUS_IS_OK(nt_status)) { return nt_status; } 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 { - talloc_free(mem_ctx); return NT_STATUS_OK; } } |