summaryrefslogtreecommitdiffstats
path: root/source/libsmb/smb_signing.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-03-10 16:53:06 -0700
committerKarolin Seeger <kseeger@samba.org>2009-03-11 08:30:43 +0100
commit54ca4cc63c5364bcfb48a1a31812b4b1fc51ac44 (patch)
treebc77ccf301e4270db5d065e285aa5485d133d5c2 /source/libsmb/smb_signing.c
parent765e6313408fda8943ae2ca48e4ad2f61a7714f6 (diff)
downloadsamba-54ca4cc63c5364bcfb48a1a31812b4b1fc51ac44.tar.gz
samba-54ca4cc63c5364bcfb48a1a31812b4b1fc51ac44.tar.xz
samba-54ca4cc63c5364bcfb48a1a31812b4b1fc51ac44.zip
s3:signing: the seqnum should only be decremented by 1 for ntcancel requests
[MS-SMB] 3.3.5.1 Receiving Any Message says that the seqnum is incremented by only for ntcancel requests for any other request it's by incremented by 2, even if it doesn't expect a response. metze (cherry picked from commit 0999366b6b36f3084870af0375d686b0cbaae698)
Diffstat (limited to 'source/libsmb/smb_signing.c')
-rw-r--r--source/libsmb/smb_signing.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/libsmb/smb_signing.c b/source/libsmb/smb_signing.c
index ea1eb05cfb1..55b30d476f0 100644
--- a/source/libsmb/smb_signing.c
+++ b/source/libsmb/smb_signing.c
@@ -865,7 +865,7 @@ void srv_defer_sign_response(uint16 mid)
cancelled by mid. This should never find one....
************************************************************/
-void srv_cancel_sign_response(uint16 mid)
+void srv_cancel_sign_response(uint16 mid, bool cancel)
{
struct smb_basic_signing_context *data;
uint32 dummy_seq;
@@ -884,7 +884,9 @@ void srv_cancel_sign_response(uint16 mid)
;
/* cancel doesn't send a reply so doesn't burn a sequence number. */
- data->send_seq_num -= 1;
+ if (cancel) {
+ data->send_seq_num -= 1;
+ }
}
/***********************************************************