]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:smbd: fix SMB2 aio cancelling
authorRalph Boehme <slow@samba.org>
Sun, 28 Oct 2018 18:35:59 +0000 (19:35 +0100)
committerKarolin Seeger <kseeger@samba.org>
Tue, 6 Nov 2018 08:10:22 +0000 (09:10 +0100)
As we currently don't attempt to cancel the internal aio request, we
must ignore the SMB2 cancel request and continue to process the SMB2
request, cf MS-SM2 3.3.5.16:

  If the target request is not successfully canceled, processing of the
  target request MUST continue and no response is sent to the cancel
  request.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13667

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 07eb805cde4db6ac74740e3cfbc56ab6f8e2118a)

selftest/knownfail.d/samba3.smb2 [deleted file]
source3/smbd/aio.c

diff --git a/selftest/knownfail.d/samba3.smb2 b/selftest/knownfail.d/samba3.smb2
deleted file mode 100644 (file)
index f4e2ecf..0000000
+++ /dev/null
@@ -1 +0,0 @@
-^samba3.smb2.aio_delay.aio_cancel\(nt4_dc\)
index 4fc1132be87e359c6f8fc73ad41959738c6bbe2b..a7540ed7b916e4f4ccf9b56b71c25cd0f970a2cc 100644 (file)
@@ -645,12 +645,16 @@ bool cancel_smb2_aio(struct smb_request *smbreq)
        }
 
        /*
-        * We let the aio request run. Setting fsp to NULL has the
-        * effect that the _done routines don't send anything out.
+        * We let the aio request run and don't try to cancel it which means
+        * processing of the SMB2 request must continue as normal, cf MS-SMB2
+        * 3.3.5.16:
+        *
+        *   If the target request is not successfully canceled, processing of
+        *   the target request MUST continue and no response is sent to the
+        *   cancel request.
         */
 
-       aio_ex->fsp = NULL;
-       return true;
+       return false;
 }
 
 static void aio_pread_smb2_done(struct tevent_req *req);