From: Ralph Boehme Date: Wed, 20 Jan 2021 14:19:31 +0000 (+0100) Subject: vfs_streams_xattr: use pathref in streams_xattr_unlink_internal() X-Git-Tag: tevent-0.11.0~1925 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=274ed8c012ccbcd67068d4cb4e144765f840c0d2;p=thirdparty%2Fsamba.git vfs_streams_xattr: use pathref in streams_xattr_unlink_internal() All callers now pass an smb_fname that has a valid pathref fsp. Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c index 72032824b93..f66fad7d169 100644 --- a/source3/modules/vfs_streams_xattr.c +++ b/source3/modules/vfs_streams_xattr.c @@ -539,7 +539,10 @@ static int streams_xattr_unlink_internal(vfs_handle_struct *handle, goto fail; } - ret = SMB_VFS_REMOVEXATTR(handle->conn, smb_fname, xattr_name); + SMB_ASSERT(smb_fname->fsp != NULL); + SMB_ASSERT(smb_fname->fsp->base_fsp != NULL); + + ret = SMB_VFS_FREMOVEXATTR(smb_fname->fsp->base_fsp, xattr_name); if ((ret == -1) && (errno == ENOATTR)) { errno = ENOENT;