From 0abfb67c79dde280b3dae14a7c7bcdb5f4d58e44 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 15 Mar 2005 18:21:35 +0000 Subject: [PATCH] r5804: Revert the signing change by Nalin Dahyabhai . Seems to be incorrect (several user reports). Jeremy. --- source/libsmb/smb_signing.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/libsmb/smb_signing.c b/source/libsmb/smb_signing.c index df69ff3e41f..500ff7cc6e2 100644 --- a/source/libsmb/smb_signing.c +++ b/source/libsmb/smb_signing.c @@ -277,14 +277,17 @@ static void simple_packet_signature(struct smb_basic_signing_context *data, MD5Init(&md5_ctx); /* intialise with the key */ + MD5Update(&md5_ctx, data->mac_key.data, data->mac_key.length); +#if 0 + /* JRA - apparently this is incorrect. */ /* 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 */ - MD5Update(&md5_ctx, data->mac_key.data, data->mac_key.length); if (data->mac_key.length < sizeof(key_buf)) { memset(key_buf, 0, sizeof(key_buf)); MD5Update(&md5_ctx, key_buf, sizeof(key_buf) - data->mac_key.length); } +#endif /* copy in the first bit of the SMB header */ MD5Update(&md5_ctx, buf + 4, smb_ss_field - 4);