]> git.ipfire.org Git - thirdparty/samba.git/commit
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)
committerJule Anger <janger@samba.org>
Tue, 16 Jan 2024 09:09:15 +0000 (09:09 +0000)
commit77a71bc9932acc7e73fe4b89443bf500c0374a98
treec18feb3fa20df3d6a3790b0420e8227acec793b3
parent15536403f631e757b8d3db77ea442cb858e03bd3
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