s3: smbd: Ignore fstat() error on deleted stream in fd_close().
authorRalph Boehme <slow@samba.org>
Wed, 20 Sep 2023 21:21:44 +0000 (14:21 -0700)
committerJule Anger <janger@samba.org>
Mon, 13 Nov 2023 10:02:51 +0000 (10:02 +0000)
commitadb1da16e39d4be1ae01e6ec8064e5d897a81a9e
treed4cc25867add51a154b4c7b4800a70db81790274
parent3b649ba044c8d287bc179c3f17ee850eb5dae820
s3: smbd: Ignore fstat() error on deleted stream in fd_close().

In the fd_close() fsp->fsp_flags.fstat_before_close code path.

If this is a stream and delete-on-close was set, the
backing object (an xattr from streams_xattr) might
already be deleted so fstat() fails with
NT_STATUS_NOT_FOUND. So if fsp refers to a stream we
ignore the error and only bail for normal files where
an fstat() should still work. NB. We cannot use
fsp_is_alternate_stream(fsp) for this as the base_fsp
has already been closed at this point and so the value
fsp_is_alternate_stream() checks for is already NULL.

Remove knownfail.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=15487

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Oct 10 09:39:27 UTC 2023 on atb-devel-224

(cherry picked from commit 633a3ee6894cc1d05b44dbe47a278202803d9b21)

Autobuild-User(v4-19-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-19-test): Mon Nov 13 10:02:51 UTC 2023 on atb-devel-224
source3/smbd/open.c