git.samba.org
/
gd
/
samba
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2150663
)
Correctly identify enc/non-enc packets.
author
Jeremy Allison
<jra@samba.org>
Tue, 8 Jan 2008 23:57:08 +0000
(15:57 -0800)
committer
Jeremy Allison
<jra@samba.org>
Tue, 8 Jan 2008 23:57:08 +0000
(15:57 -0800)
Jeremy.
source/smbd/seal.c
patch
|
blob
|
history
diff --git
a/source/smbd/seal.c
b/source/smbd/seal.c
index 21fca73feaede3c3e5fbe795264ad5dd17e791f5..51a5f23f03c63ead44591653430d314a46c505bc 100644
(file)
--- 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;