summaryrefslogtreecommitdiff
path: root/libcli/auth/ntlmssp.h
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-09-16 14:37:20 +1000
committerAndrew Tridgell <tridge@samba.org>2010-09-16 21:09:17 +1000
commit6832d5e9334f93d2b41fa50580379a2381311748 (patch)
treec4cb065d6ca93f4f367a2329b14a6eac90d163af /libcli/auth/ntlmssp.h
parentd5a4e53ad8dd572b9469530dfcd37601e2905a88 (diff)
downloadsamba-6832d5e9334f93d2b41fa50580379a2381311748.tar.gz
samba-6832d5e9334f93d2b41fa50580379a2381311748.tar.bz2
samba-6832d5e9334f93d2b41fa50580379a2381311748.zip
libcli/auth/ntlmssp Be clear about talloc parents for session keys
The previous API was not clear as to who owned the returned session key. This fixes a valgrind-found use-after-free in the NTLMSSP key derivation code, and avoids making allocations - we steal and zero instead. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'libcli/auth/ntlmssp.h')
-rw-r--r--libcli/auth/ntlmssp.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/libcli/auth/ntlmssp.h b/libcli/auth/ntlmssp.h
index d0a282c350..dead412c99 100644
--- a/libcli/auth/ntlmssp.h
+++ b/libcli/auth/ntlmssp.h
@@ -129,11 +129,13 @@ struct ntlmssp_state
*
* The callback must reads the feilds of this structure for the information it needs on the user
* @param ntlmssp_state This structure
+ * @param mem_ctx Talloc context for LM and NT session key to be returned on
* @param nt_session_key If an NT session key is returned by the authentication process, return it here
* @param lm_session_key If an LM session key is returned by the authentication process, return it here
*
*/
- NTSTATUS (*check_password)(struct ntlmssp_state *ntlmssp_state, DATA_BLOB *nt_session_key, DATA_BLOB *lm_session_key);
+ NTSTATUS (*check_password)(struct ntlmssp_state *ntlmssp_state, TALLOC_CTX *mem_ctx,
+ DATA_BLOB *nt_session_key, DATA_BLOB *lm_session_key);
union ntlmssp_crypt_state *crypt;
};