smbd: replace CHECK_WRITE() macro with calls to check_any_access_fsp()
commit44396d7bade98b41fb655e30d84195793684f593
authorRalph Boehme <slow@samba.org>
Wed, 20 Dec 2023 17:32:25 +0000 (20 18:32 +0100)
committerJule Anger <janger@samba.org>
Tue, 9 Jan 2024 12:13:13 +0000 (9 12:13 +0000)
tree61faeec29a3f19cba396a121d67a55b12048fc3c
parentbfa5f1780990e4f763f0214fb660c64c53188e65
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>
(cherry picked from commit 995a31c8d4c1789c16bae6b8196f2565d4b1dfdb)
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