s3:smbd: add vfs_valid_{pread,pwrite}_range() helper functions
commit70fa4b884d2c22669984c25fe757c2fc528f7331
authorStefan Metzmacher <metze@samba.org>
Mon, 11 May 2020 20:00:37 +0000 (11 22:00 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 12 May 2020 19:53:44 +0000 (12 19:53 +0000)
tree87492d6a86c667540854da4c6b11aac165737add
parentba68f21286c2c2f1fef8bf8c9cd500a622077887
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>
source3/smbd/proto.h
source3/smbd/vfs.c