summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-03-15 18:21:35 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:01 -0500
commit3b7dccf076628114d4fb1f67ab7aa05457de367d (patch)
tree75d0e98ce29b8dfbddd83e15ef32ca001516e3dd /source3
parentcc5ba986bf4c7b704ae5c3787f2f3881145e719c (diff)
downloadsamba-3b7dccf076628114d4fb1f67ab7aa05457de367d.tar.gz
samba-3b7dccf076628114d4fb1f67ab7aa05457de367d.tar.bz2
samba-3b7dccf076628114d4fb1f67ab7aa05457de367d.zip
r5804: Revert the signing change by Nalin Dahyabhai <nalin@redhat.com>.
Seems to be incorrect (several user reports). Jeremy. (This used to be commit 0abfb67c79dde280b3dae14a7c7bcdb5f4d58e44)
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/smb_signing.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/libsmb/smb_signing.c b/source3/libsmb/smb_signing.c
index df69ff3e41..500ff7cc6e 100644
--- a/source3/libsmb/smb_signing.c
+++ b/source3/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 <nalin@redhat.com> */
- 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);