]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
VFS: streams_xattr: In streams_xattr_renameat(), change SMB_VFS_REMOVEXATTR() ->...
authorJeremy Allison <jra@samba.org>
Fri, 12 Mar 2021 22:36:49 +0000 (14:36 -0800)
committerRalph Boehme <slow@samba.org>
Wed, 7 Apr 2021 16:26:28 +0000 (16:26 +0000)
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 <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_streams_xattr.c

index c28abb2a86eeba5bfc83d45b27c19554074bfd86..b9a4eb325073da248bff063a7deb6d7a76180aaa 100644 (file)
@@ -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) {