[SCM] Samba Shared Repository - branch v4-19-test updated
Jule Anger
janger at samba.org
Mon Nov 13 10:03:01 UTC 2023
The branch, v4-19-test has been updated
via adb1da16e39 s3: smbd: Ignore fstat() error on deleted stream in fd_close().
from 3b649ba044c s4:kdc: fix user2user tgs-requests for normal user accounts
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-19-test
- Log -----------------------------------------------------------------
commit adb1da16e39d4be1ae01e6ec8064e5d897a81a9e
Author: Ralph Boehme <slow at samba.org>
Date: Wed Sep 20 14:21:44 2023 -0700
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 at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Volker Lendecke <vl at 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 at samba.org>
Autobuild-Date(v4-19-test): Mon Nov 13 10:02:51 UTC 2023 on atb-devel-224
-----------------------------------------------------------------------
Summary of changes:
source3/smbd/open.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
Changeset truncated at 500 lines:
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 93c12e00eb0..3581c4b9173 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -997,7 +997,20 @@ NTSTATUS fd_close(files_struct *fsp)
if (fsp->fsp_flags.fstat_before_close) {
status = vfs_stat_fsp(fsp);
if (!NT_STATUS_IS_OK(status)) {
- return status;
+ /*
+ * 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.
+ */
+ if (fsp->fsp_name->stream_name == NULL) {
+ return status;
+ }
}
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list