]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: VFS: vfs_streams_xattr: Convert streams_xattr_unlink_internal() to use UNLINKAT.
authorJeremy Allison <jra@samba.org>
Wed, 18 Sep 2019 02:10:24 +0000 (19:10 -0700)
committerRalph Boehme <slow@samba.org>
Thu, 26 Sep 2019 17:20:47 +0000 (17:20 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_streams_xattr.c

index b04fe723b67f3ed0cd12af25f4b739ddfbfda051..786054690943f890f96bb989073b8b0ad79d4f36 100644 (file)
@@ -556,7 +556,10 @@ static int streams_xattr_unlink_internal(vfs_handle_struct *handle,
        char *xattr_name = NULL;
 
        if (!is_ntfs_stream_smb_fname(smb_fname)) {
-               return SMB_VFS_NEXT_UNLINK(handle, smb_fname);
+               return SMB_VFS_NEXT_UNLINKAT(handle,
+                                       dirfsp,
+                                       smb_fname,
+                                       flags);
        }
 
        /* If the default stream is requested, just open the base file. */
@@ -569,7 +572,10 @@ static int streams_xattr_unlink_internal(vfs_handle_struct *handle,
                        return -1;
                }
 
-               ret = SMB_VFS_NEXT_UNLINK(handle, smb_fname_base);
+               ret = SMB_VFS_NEXT_UNLINKAT(handle,
+                               dirfsp,
+                               smb_fname_base,
+                               flags);
 
                TALLOC_FREE(smb_fname_base);
                return ret;