s3:smbd: add vfs_valid_{pread,pwrite}_range() helper functions
authorStefan Metzmacher <metze@samba.org>
Mon, 11 May 2020 20:00:37 +0000 (22:00 +0200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 14 May 2020 07:25:45 +0000 (07:25 +0000)
commit3197bd27b359746aaa70fa80b1971fc42cc96c13
treeda399599c2f71613d60347bfbf2e726db45cbeb5
parent9b0aba40e836b7686c609fa6b5ab2e95ebb48e48
s3:smbd: add vfs_valid_{pread,pwrite}_range() helper functions

These implement the SMB2 visible behavior of the [MS-FSA]
2.1.5.2 Server Requests a Read and 2.1.5.3 Server Requests a Write
constraints. Note that offset < 0 is not allowed over SMB.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 70fa4b884d2c22669984c25fe757c2fc528f7331)
source3/smbd/proto.h
source3/smbd/vfs.c