From: Stefan Metzmacher Date: Mon, 17 Jun 2024 08:41:53 +0000 (+0200) Subject: vfs_default: also call vfs_offload_token_ctx_init in vfswrap_offload_write_send X-Git-Tag: samba-4.19.8~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac5efd0302fa95de7a2be3498ebb266b2df36f63;p=thirdparty%2Fsamba.git vfs_default: also call vfs_offload_token_ctx_init in vfswrap_offload_write_send 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 Reviewed-by: Noel Power Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Mon Jun 17 18:02:27 UTC 2024 on atb-devel-224 (cherry picked from commit 462b74da79c51f9ba6dbd24e603aa904485d5123) --- diff --git a/selftest/knownfail.d/smb2.ioctl.copy_chunk b/selftest/knownfail.d/smb2.ioctl.copy_chunk deleted file mode 100644 index 56e8e2caf58..00000000000 --- a/selftest/knownfail.d/smb2.ioctl.copy_chunk +++ /dev/null @@ -1 +0,0 @@ -^samba3.smb2.ioctl.*.copy_chunk_bug15644 diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 8d78831492f..c8fe154b031 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -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) {