samba-cvs.cvs
[Top] [All Lists]

svn commit: samba r13488 - in trunk/source/libsmb: .

Subject: svn commit: samba r13488 - in trunk/source/libsmb: .
From:
Date: Mon, 13 Feb 2006 13:25:34 +0000 GMT
Author: jra
Date: 2006-02-13 13:25:34 +0000 (Mon, 13 Feb 2006)
New Revision: 13488

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

Log:
Fix #3496 from jason@xxxxxxxxxxxxx Variable set but never used.
Jeremy.

Modified:
   trunk/source/libsmb/ntlmssp_sign.c


Changeset:
Modified: trunk/source/libsmb/ntlmssp_sign.c
===================================================================
--- trunk/source/libsmb/ntlmssp_sign.c  2006-02-13 09:45:23 UTC (rev 13487)
+++ trunk/source/libsmb/ntlmssp_sign.c  2006-02-13 13:25:34 UTC (rev 13488)
@@ -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);

<Prev in Thread] Current Thread [Next in Thread>
  • svn commit: samba r13488 - in trunk/source/libsmb: ., jra <=