Skip to content

Fix crash in streams_xattr caused by setting fruit:resource = stream. Bug 15099.

Adds regression test showing the crash, then fixes it by adding the same accommodation to streams_xattr_unlinkat() as used in streams_xattr_renameat() and streams_xattr_stat().

vfs_fruit passes a synthetic filename here where smb_fname->fsp==NULL when configured to use "fruit:resource = stream" so we need to use synthetic_pathref() to get an fsp on the smb_fname->base_name in order to call SMB_VFS_FREMOVEXATTR().

This is the same change we already use in streams_xattr_renameat() and streams_xattr_stat(), the other pathname operations we implement here (we just missed it for streams_xattr_unlinkat()).

Confirmed as fixing the reported problem by Canonical.

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

Passes ci.

Merge request reports