summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-01-08 16:08:39 -0800
committerJeremy Allison <jra@samba.org>2008-01-08 16:08:39 -0800
commit7febec3c58bebb20d7866ea98c43bb41f0c09db4 (patch)
tree3fc6a3d7b6eb0248639c760686251d494260dc8d
parent80158198eee90cf05396989df068f77f8bb7e064 (diff)
downloadsamba-7febec3c58bebb20d7866ea98c43bb41f0c09db4.tar.gz
samba-7febec3c58bebb20d7866ea98c43bb41f0c09db4.tar.bz2
samba-7febec3c58bebb20d7866ea98c43bb41f0c09db4.zip
Simplify... plus add a debug message.
Jeremy. (This used to be commit bedc493874adaf783362ba7b821e2a6d985b96ea)
-rw-r--r--source3/smbd/seal.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/smbd/seal.c b/source3/smbd/seal.c
index 51a5f23f03..ea017e08d8 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 or 0xFF'SMB' messages. */
- if(CVAL(inbuf,0) || IVAL(inbuf,4) == 0x424d53ff) {
+ /* Ignore non-session messages or non 0xFF'E' messages. */
+ if(CVAL(inbuf,0) || !(inbuf[4] == 0xFF && inbuf[5] == 'E')) {
return false;
}
@@ -63,9 +63,8 @@ bool is_encrypted_packet(const uint8_t *inbuf)
return false;
}
- if (SVAL(inbuf,4) == 0x45FF &&
- srv_trans_enc_ctx &&
- enc_num == srv_enc_ctx()) {
+ /* Encrypted messages are 0xFF'E'<ctx> */
+ if (srv_trans_enc_ctx && enc_num == srv_enc_ctx()) {
return true;
}
return false;
@@ -714,6 +713,7 @@ NTSTATUS srv_encryption_start(connection_struct *conn)
partial_srv_trans_enc_ctx = NULL;
+ DEBUG(1,("srv_encryption_start: context negotiated\n"));
return NT_STATUS_OK;
}