summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-02-13 13:25:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:10:06 -0500
commit3df82f57fcb97eedb53473bc719101e626c4de84 (patch)
treecde6ef48a8e5dc9a8ee2823166dafd0344f31386 /source3/libsmb
parent7461a457d1c83ecb54310f04d9672a2180f5fb87 (diff)
downloadsamba-3df82f57fcb97eedb53473bc719101e626c4de84.tar.gz
samba-3df82f57fcb97eedb53473bc719101e626c4de84.tar.bz2
samba-3df82f57fcb97eedb53473bc719101e626c4de84.zip
r13489: Fix #3496 from jason@ncac.gwu.edu. Variable set but never used.
Jeremy. (This used to be commit 4204794cc7c5e2671259652879c33f539d26958c)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/ntlmssp_sign.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/libsmb/ntlmssp_sign.c b/source3/libsmb/ntlmssp_sign.c
index 68d4b7aec7..42ed0f9418 100644
--- a/source3/libsmb/ntlmssp_sign.c
+++ b/source3/libsmb/ntlmssp_sign.c
@@ -236,8 +236,6 @@ NTSTATUS ntlmssp_seal_packet(NTLMSSP_STATE *ntlmssp_state,
uchar *whole_pdu, size_t pdu_length,
DATA_BLOB *sig)
{
- NTSTATUS nt_status;
-
if (!(ntlmssp_state->neg_flags & NTLMSSP_NEGOTIATE_SEAL)) {
DEBUG(3, ("NTLMSSP Sealing not negotiated - cannot seal packet!\n"));
return NT_STATUS_INVALID_PARAMETER;
@@ -254,10 +252,14 @@ NTSTATUS ntlmssp_seal_packet(NTLMSSP_STATE *ntlmssp_state,
/* The order of these two operations matters - we must first seal the packet,
then seal the sequence number - this is becouse the send_seal_hash is not
constant, but is is rather updated with each iteration */
- nt_status = ntlmssp_make_packet_signature(ntlmssp_state,
+ NTSTATUS nt_status = ntlmssp_make_packet_signature(ntlmssp_state,
data, length,
whole_pdu, pdu_length,
NTLMSSP_SEND, sig, False);
+ if (!NT_STATUS_IS_OK(nt_status)) {
+ return nt_status;
+ }
+
smb_arc4_crypt(ntlmssp_state->send_seal_arc4_state, data, length);
if (ntlmssp_state->neg_flags & NTLMSSP_NEGOTIATE_KEY_EXCH) {
smb_arc4_crypt(ntlmssp_state->send_seal_arc4_state, sig->data+4, 8);
@@ -283,8 +285,6 @@ NTSTATUS ntlmssp_seal_packet(NTLMSSP_STATE *ntlmssp_state,
smb_arc4_crypt(ntlmssp_state->ntlmv1_arc4_state, sig->data+4, sig->length-4);
ntlmssp_state->ntlmv1_seq_num++;
-
- nt_status = NT_STATUS_OK;
}
dump_data_pw("ntlmssp signature\n", sig->data, sig->length);
dump_data_pw("ntlmssp sealed data\n", data, length);