smbd: replace CHECK_WRITE() macro with calls to check_any_access_fsp()
authorRalph Boehme <slow@samba.org>
Wed, 20 Dec 2023 17:32:25 +0000 (18:32 +0100)
committerRalph Boehme <slow@samba.org>
Mon, 8 Jan 2024 15:53:36 +0000 (15:53 +0000)
commit995a31c8d4c1789c16bae6b8196f2565d4b1dfdb
tree0c946bb27b1f9f887b0a3a1c16660c3ab1b549a6
parentee3035218df4cfd68b6aab6825c78f2b85234c6c
smbd: replace CHECK_WRITE() macro with calls to check_any_access_fsp()

The additional check if fd underlying fd is valid and not -1 should not be done
at this place. I actually would prefer an write to fail with EBADF if this
happens, as it's likely easier to debug why this happened. These days we should
always have a valid fd.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/include/smb_macros.h
source3/modules/offload_token.c
source3/smbd/smb1_reply.c
source3/smbd/smb2_flush.c
source3/smbd/smb2_write.c