svn commit: samba r10712 - in
branches/SAMBA_4_0/source/libcli/auth: .
abartlet at samba.org
abartlet at samba.org
Tue Oct 4 12:04:11 GMT 2005
Author: abartlet
Date: 2005-10-04 12:04:10 +0000 (Tue, 04 Oct 2005)
New Revision: 10712
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10712
Log:
Use data_blob_talloc, thanks to valgrind for finding the errors.
Andrew Bartlett
Modified:
branches/SAMBA_4_0/source/libcli/auth/smbencrypt.c
Changeset:
Modified: branches/SAMBA_4_0/source/libcli/auth/smbencrypt.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/auth/smbencrypt.c 2005-10-04 12:02:52 UTC (rev 10711)
+++ branches/SAMBA_4_0/source/libcli/auth/smbencrypt.c 2005-10-04 12:04:10 UTC (rev 10712)
@@ -348,7 +348,7 @@
/* Given that data, and the challenge from the server, generate a response */
SMBOWFencrypt_ntv2(ntlm_v2_hash, server_chal, &ntlmv2_client_data, ntlmv2_response);
- final_response = data_blob(out_mem_ctx, sizeof(ntlmv2_response) + ntlmv2_client_data.length);
+ final_response = data_blob_talloc(out_mem_ctx, NULL, sizeof(ntlmv2_response) + ntlmv2_client_data.length);
memcpy(final_response.data, ntlmv2_response, sizeof(ntlmv2_response));
@@ -365,8 +365,8 @@
const DATA_BLOB *server_chal)
{
uint8_t lmv2_response[16];
- DATA_BLOB lmv2_client_data = data_blob(mem_ctx, 8);
- DATA_BLOB final_response = data_blob(mem_ctx, 24);
+ DATA_BLOB lmv2_client_data = data_blob_talloc(mem_ctx, NULL, 8);
+ DATA_BLOB final_response = data_blob_talloc(mem_ctx, NULL,24);
/* LMv2 */
/* client-supplied random data */
@@ -408,7 +408,7 @@
ntlm_v2_hash, server_chal,
names_blob);
if (user_session_key) {
- *user_session_key = data_blob(mem_ctx, 16);
+ *user_session_key = data_blob_talloc(mem_ctx, NULL, 16);
/* The NTLMv2 calculations also provide a session key, for signing etc later */
/* use only the first 16 bytes of nt_response for session key */
@@ -422,7 +422,7 @@
*lm_response = LMv2_generate_response(mem_ctx,
ntlm_v2_hash, server_chal);
if (lm_session_key) {
- *lm_session_key = data_blob(mem_ctx, 16);
+ *lm_session_key = data_blob_talloc(mem_ctx, NULL, 16);
/* The NTLMv2 calculations also provide a session key, for signing etc later */
/* use only the first 16 bytes of lm_response for session key */
More information about the samba-cvs
mailing list