]> git.ipfire.org Git - thirdparty/samba.git/commit
smbd: simplify handling of failing fstat() after unlinking file
authorRalph Boehme <slow@samba.org>
Mon, 5 Feb 2024 14:03:48 +0000 (15:03 +0100)
committerNoel Power <npower@samba.org>
Wed, 13 Mar 2024 09:25:33 +0000 (09:25 +0000)
commit6e6324cff29089a636823786183222a73fe7cb28
tree63599992d1f1bceaf812a72ca99aef0ea502c3be
parent78208d4fe47a0c634a6bd7c04f3d01f0020ee88b
smbd: simplify handling of failing fstat() after unlinking file

close_remove_share_mode() already called vfs_stat_fsp(), so we can skip the
fstat() triggered in fd_close() by fsp->fsp_flags.fstat_before_close being true.

This avoids getting an EACCESS error when doing an fstat() on the removed file
which seems to happen with some FUSE filesystems.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/close.c
source3/smbd/open.c