vfs_default: fix vfswrap_offload_write_send() NT_STATUS_INVALID_VIEW_SIZE check
authorStefan Metzmacher <metze@samba.org>
Tue, 31 Jul 2018 10:29:29 +0000 (12:29 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 28 Mar 2019 23:09:35 +0000 (23:09 +0000)
commit4d6cd932a955a99ca33cc4aedd7f612e56e0b1de
treecb597ebe2584b7782ce0b9318aa6514f784ab61a
parent2abf9e9a95cbdf76109b3501dee3e0c34ad09194
vfs_default: fix vfswrap_offload_write_send() NT_STATUS_INVALID_VIEW_SIZE check

This fixes a regression introduced in commit
60e45a2d25401eaf9a15a86d19114670ccfde259, where the 'num' variable
was renamed to 'to_copy', but a new 'num' variable was introduced.

Note that off_t is signed!
In future we need to watch out for filesystems supporting
FMODE_UNSIGNED_OFFSET on Linux. Which means they use it unsigned.

This is more or less a theoretical problem, The
NT_STATUS_INVALID_PARAMETER cases are catched before by
SMB_VFS_PREAD_SEND/RECV.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_default.c