]> 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)
committerStefan Metzmacher <metze@samba.org>
Mon, 17 Jun 2024 18:02:27 +0000 (18:02 +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

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 48b5dd9e39f46b178ba734651a8cf25242839358..e0ebc7bd1a278a3dcb3749faf9aa698cc31982df 100644 (file)
@@ -2148,6 +2148,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) {