svn commit: samba r13489 - in branches/SAMBA_3_0/source/libsmb: .

jra at samba.org jra at samba.org
Mon Feb 13 13:25:38 GMT 2006


Author: jra
Date: 2006-02-13 13:25:36 +0000 (Mon, 13 Feb 2006)
New Revision: 13489

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13489

Log:
Fix #3496 from jason at ncac.gwu.edu. Variable set but never used.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/libsmb/ntlmssp_sign.c


Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/ntlmssp_sign.c
===================================================================
--- branches/SAMBA_3_0/source/libsmb/ntlmssp_sign.c	2006-02-13 13:25:34 UTC (rev 13488)
+++ branches/SAMBA_3_0/source/libsmb/ntlmssp_sign.c	2006-02-13 13:25:36 UTC (rev 13489)
@@ -236,8 +236,6 @@
 			     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 @@
 		/* 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 @@
 		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);



More information about the samba-cvs mailing list