]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_default: also call vfs_offload_token_ctx_init in vfswrap_offload_write_send
authorStefan Metzmacher <metze@samba.org>
Mon, 17 Jun 2024 08:41:53 +0000 (10:41 +0200)
committerJule Anger <janger@samba.org>
Wed, 3 Jul 2024 08:48:12 +0000 (08:48 +0000)
If a client for whatever reason calls FSCTL_SRV_COPYCHUNK[_WRITE] without
FSCTL_SRV_REQUEST_RESUME_KEY, we call vfswrap_offload_write_send
before vfswrap_offload_read_send.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15664

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Jun 17 18:02:27 UTC 2024 on atb-devel-224

(cherry picked from commit 462b74da79c51f9ba6dbd24e603aa904485d5123)

selftest/knownfail.d/smb2.ioctl.copy_chunk [deleted file]
source3/modules/vfs_default.c

diff --git a/selftest/knownfail.d/smb2.ioctl.copy_chunk b/selftest/knownfail.d/smb2.ioctl.copy_chunk
deleted file mode 100644 (file)
index 56e8e2c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-^samba3.smb2.ioctl.*.copy_chunk_bug15644
index 8d78831492f05ec36e8d3a46f5684cb58b027eaf..c8fe154b031d2b59720d50778e6cc0e6afc607a4 100644 (file)
@@ -2135,6 +2135,12 @@ static struct tevent_req *vfswrap_offload_write_send(
                .remaining = to_copy,
        };
 
+       status = vfs_offload_token_ctx_init(handle->conn->sconn->client,
+                                           &vfswrap_offload_ctx);
+       if (tevent_req_nterror(req, status)) {
+               return tevent_req_post(req, ev);
+       }
+
        tevent_req_set_cleanup_fn(req, vfswrap_offload_write_cleanup);
 
        switch (fsctl) {