From: Jeremy Allison Date: Fri, 12 Mar 2021 22:36:49 +0000 (-0800) Subject: VFS: streams_xattr: In streams_xattr_renameat(), change SMB_VFS_REMOVEXATTR() ->... X-Git-Tag: tevent-0.11.0~1281 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f6cd9a548fa646a7916ce424b8242f1fd6ffc543;p=thirdparty%2Fsamba.git VFS: streams_xattr: In streams_xattr_renameat(), change SMB_VFS_REMOVEXATTR() -> SMB_VFS_FREMOVEXATTR(). Note that now we're doing this by handle not by pathname we must do it on the base_fsp, as we have to remove the actual xattr on the base file. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c index c28abb2a86e..b9a4eb32507 100644 --- a/source3/modules/vfs_streams_xattr.c +++ b/source3/modules/vfs_streams_xattr.c @@ -666,8 +666,15 @@ static int streams_xattr_renameat(vfs_handle_struct *handle, goto fail; } - /* remove the old stream */ - oret = SMB_VFS_REMOVEXATTR(handle->conn, smb_fname_src, + /* + * remove the old stream. + * Note that now we're doing this by handle + * not by pathname we must do it on the base_fsp, + * as we have to remove the actual xattr on the base file. + */ + SMB_ASSERT(smb_fname_src->fsp->base_fsp != NULL); + + oret = SMB_VFS_FREMOVEXATTR(smb_fname_src->fsp->base_fsp, src_xattr_name); if (oret < 0) { if (errno == ENOATTR) {