vfs_default: properly track written bytes for copy-chunk
authorRalph Boehme <slow@samba.org>
Fri, 25 Jun 2021 13:47:38 +0000 (15:47 +0200)
committerJule Anger <janger@samba.org>
Wed, 11 Aug 2021 09:54:14 +0000 (09:54 +0000)
commit0772ff448fc054250e580a6e2e48b69485eca506
tree2eb2736546887bb380216e83c859e50ebaaaaa34
parentd5d6bbaa9395458114a5f2b4f3c398ef889f67ae
vfs_default: properly track written bytes for copy-chunk

No change in behavour, this just makes the logic slightly more
understandable. In theory it would also allow the logic to be adjusted for
allowing short reads which is not quite clear from MS-SMB2 if we should allow
it. The file could be truncated while we're reading it.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit e2d524d4baee193b0d03df3e7edda48b3cb4bddf)
source3/modules/vfs_default.c