summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/smb_server/reply.c1
-rw-r--r--source4/smb_server/signing.c12
2 files changed, 11 insertions, 2 deletions
diff --git a/source4/smb_server/reply.c b/source4/smb_server/reply.c
index 615dd692a1..8fd97df44a 100644
--- a/source4/smb_server/reply.c
+++ b/source4/smb_server/reply.c
@@ -2320,6 +2320,7 @@ void reply_ntcreate_and_X(struct smbsrv_request *req)
void reply_ntcancel(struct smbsrv_request *req)
{
/* NOTE: this request does not generate a reply */
+ req_signing_no_reply(req);
ntvfs_cancel(req);
req_destroy(req);
}
diff --git a/source4/smb_server/signing.c b/source4/smb_server/signing.c
index 8a3fd10095..c397963f38 100644
--- a/source4/smb_server/signing.c
+++ b/source4/smb_server/signing.c
@@ -130,13 +130,21 @@ static void req_signing_alloc_seq_num(struct smbsrv_request *req)
{
req->seq_num = req->smb_conn->signing.next_seq_num;
- /* TODO: we need to handle one-way requests like NTcancel, which
- only increment the sequence number by 1 */
if (req->smb_conn->signing.signing_state != SMB_SIGNING_OFF) {
req->smb_conn->signing.next_seq_num += 2;
}
}
+/*
+ called for requests that do not produce a reply of their own
+*/
+void req_signing_no_reply(struct smbsrv_request *req)
+{
+ if (req->smb_conn->signing.signing_state != SMB_SIGNING_OFF) {
+ req->smb_conn->signing.next_seq_num--;
+ }
+}
+
/***********************************************************
SMB signing - Simple implementation - check a MAC sent by client
************************************************************/