From: Andreas Schneider Date: Fri, 12 Jun 2026 13:50:40 +0000 (+0200) Subject: s3:vfs_streams_xattr: Use dirfsp in streams_xattr_unlinkat() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2fc21d87fc88f094b79701e362372f02da98ce02;p=thirdparty%2Fsamba.git s3:vfs_streams_xattr: Use dirfsp in streams_xattr_unlinkat() Since commit 09f49fb56a4 ("smbd: Simplify delete_all_streams()"), delete_all_streams() uses synthetic_smb_fname() instead of synthetic_pathref(), passing a relative base_name to SMB_VFS_UNLINKAT() that is relative to dirfsp, not the share root. streams_xattr_unlinkat() creates a synthetic_pathref() for the base file when fsp is NULL, but was using handle->conn->cwd_fsp (the share root) instead of the passed dirfsp. This caused path resolution to fail for files in subdirectories, leaving xattr streams intact after an OVERWRITE or OVERWRITE_IF disposition. BUG: https://bugzilla.samba.org/show_bug.cgi?id=16144 Signed-off-by: Andreas Schneider Reviewed-by: Ralph Boehme Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Tue Jun 16 12:41:25 UTC 2026 on atb-devel-224 --- diff --git a/selftest/knownfail.d/samba3.smb2.streams b/selftest/knownfail.d/samba3.smb2.streams deleted file mode 100644 index b4a75b6b335..00000000000 --- a/selftest/knownfail.d/samba3.smb2.streams +++ /dev/null @@ -1 +0,0 @@ -^samba3.smb2.streams streams_xattr.create-disposition\(.*\) diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c index a8cc9cd10bd..726f60ecd3e 100644 --- a/source3/modules/vfs_streams_xattr.c +++ b/source3/modules/vfs_streams_xattr.c @@ -1095,7 +1095,7 @@ static int streams_xattr_unlinkat(vfs_handle_struct *handle, if (fsp == NULL) { status = synthetic_pathref(talloc_tos(), - handle->conn->cwd_fsp, + dirfsp, smb_fname->base_name, NULL, NULL,