svn commit: samba r7970 - in branches/SAMBA_4_0/source/libcli/raw: .

abartlet at samba.org abartlet at samba.org
Tue Jun 28 00:57:15 GMT 2005


Author: abartlet
Date: 2005-06-28 00:57:15 +0000 (Tue, 28 Jun 2005)
New Revision: 7970

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

Log:
This SMB signing code (merged from 3.0) turned out to be bogus.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/libcli/raw/smb_signing.c


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/raw/smb_signing.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/raw/smb_signing.c	2005-06-28 00:56:39 UTC (rev 7969)
+++ branches/SAMBA_4_0/source/libcli/raw/smb_signing.c	2005-06-28 00:57:15 UTC (rev 7970)
@@ -118,15 +118,7 @@
 
 	/* Calculate the 16 byte MAC and place first 8 bytes into the field. */
 	MD5Init(&md5_ctx);
-
-	/* NB. When making and verifying SMB signatures, Windows apparently
-		zero-pads the key to 128 bits if it isn't long enough.
-		From Nalin Dahyabhai <nalin at redhat.com> */
         MD5Update(&md5_ctx, mac_key->data, mac_key->length);
-        if (mac_key->length < sizeof(key_buf)) {
-                memset(key_buf, 0, sizeof(key_buf));
-                MD5Update(&md5_ctx, key_buf, sizeof(key_buf) - mac_key->length);
-        }
 	MD5Update(&md5_ctx, 
 		  out->buffer + NBT_HDR_SIZE, 
 		  out->size - NBT_HDR_SIZE);



More information about the samba-cvs mailing list