From 80158198eee90cf05396989df068f77f8bb7e064 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 8 Jan 2008 15:57:08 -0800 Subject: Correctly identify enc/non-enc packets. Jeremy. (This used to be commit 647f13d0f1a270a68263b3b0403436f9d6cf1a0e) --- source3/smbd/seal.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source3/smbd/seal.c') diff --git a/source3/smbd/seal.c b/source3/smbd/seal.c index 21fca73fea..51a5f23f03 100644 --- a/source3/smbd/seal.c +++ b/source3/smbd/seal.c @@ -53,8 +53,8 @@ bool is_encrypted_packet(const uint8_t *inbuf) NTSTATUS status; uint16_t enc_num; - /* Ignore non-session messages. */ - if(CVAL(inbuf,0)) { + /* Ignore non-session messages or 0xFF'SMB' messages. */ + if(CVAL(inbuf,0) || IVAL(inbuf,4) == 0x424d53ff) { return false; } @@ -63,7 +63,9 @@ bool is_encrypted_packet(const uint8_t *inbuf) return false; } - if (srv_trans_enc_ctx && enc_num == srv_enc_ctx()) { + if (SVAL(inbuf,4) == 0x45FF && + srv_trans_enc_ctx && + enc_num == srv_enc_ctx()) { return true; } return false; -- cgit