From dc90cd89a7fef3b0a744ef1873193cf2c9d75cad Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 19 Apr 2007 20:50:49 +0000 Subject: r22389: Start preparing for multiple encryption contexts in the server. Allow server to reflect back to calling client the encryption context that was sent. Jeremy. (This used to be commit b49e90335d1e589916b5ab4992e3c4a2d221ca7e) --- source3/libsmb/smb_seal.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source3/libsmb') diff --git a/source3/libsmb/smb_seal.c b/source3/libsmb/smb_seal.c index 19092bd8c8..2e3e2f4ce3 100644 --- a/source3/libsmb/smb_seal.c +++ b/source3/libsmb/smb_seal.c @@ -93,10 +93,11 @@ NTSTATUS common_ntlm_decrypt_buffer(NTLMSSP_STATE *ntlmssp_state, char *buf) } memcpy(buf + 8, inbuf + 8 + NTLMSSP_SIG_SIZE, data_len); - SAFE_FREE(inbuf); /* Reset the length. */ - smb_setlen(buf, data_len + 4); + smb_setlen(buf, data_len + 4, inbuf); + + SAFE_FREE(inbuf); return NT_STATUS_OK; } @@ -203,7 +204,7 @@ static NTSTATUS common_gss_decrypt_buffer(struct smb_tran_enc_state_gss *gss_sta } memcpy(buf + 8, out_buf.value, out_buf.length); - smb_setlen(buf, out_buf.length + 4); + smb_setlen(buf, out_buf.length + 4, out_buf.value); gss_release_buffer(&minor, &out_buf); return NT_STATUS_OK; -- cgit