summaryrefslogtreecommitdiffstats
path: root/source/smbd/seal.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-01-08 15:57:08 -0800
committerJeremy Allison <jra@samba.org>2008-01-08 15:57:08 -0800
commit647f13d0f1a270a68263b3b0403436f9d6cf1a0e (patch)
treeb4fc1831553e0bfbec57a0a585eb13aafe9d611c /source/smbd/seal.c
parent2150663d9eaf5cdab08de2ad1fcc952d7e85936c (diff)
downloadsamba-647f13d0f1a270a68263b3b0403436f9d6cf1a0e.tar.gz
samba-647f13d0f1a270a68263b3b0403436f9d6cf1a0e.tar.xz
samba-647f13d0f1a270a68263b3b0403436f9d6cf1a0e.zip
Correctly identify enc/non-enc packets.
Jeremy.
Diffstat (limited to 'source/smbd/seal.c')
-rw-r--r--source/smbd/seal.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/smbd/seal.c b/source/smbd/seal.c
index 21fca73feae..51a5f23f03c 100644
--- a/source/smbd/seal.c
+++ b/source/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;