]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: VFS: vfs_fruit. Change fruit_unlink_internal() to call UNLNKAT.
authorJeremy Allison <jra@samba.org>
Fri, 13 Sep 2019 20:20:36 +0000 (13:20 -0700)
committerRalph Boehme <slow@samba.org>
Thu, 26 Sep 2019 17:20:49 +0000 (17:20 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_fruit.c

index 41e7a34fdf9fbd3825ea00824b39a372d6e27aa0..e7d3c63c7a507d0d103c46dd56cf422e217ef536 100644 (file)
@@ -1967,9 +1967,15 @@ static int fruit_unlink_internal(vfs_handle_struct *handle,
        } else if (is_afpresource_stream(smb_fname->stream_name)) {
                return fruit_unlink_rsrc(handle, smb_fname, false);
        } else 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,
+                               0);
        } else if (is_adouble_file(smb_fname->base_name)) {
-               return SMB_VFS_NEXT_UNLINK(handle, smb_fname);
+               return SMB_VFS_NEXT_UNLINKAT(handle,
+                               dirfsp,
+                               smb_fname,
+                               0);
        }
 
        /*
@@ -1996,7 +2002,10 @@ static int fruit_unlink_internal(vfs_handle_struct *handle,
        }
        TALLOC_FREE(rsrc_smb_fname);
 
-       return SMB_VFS_NEXT_UNLINK(handle, smb_fname);
+       return SMB_VFS_NEXT_UNLINKAT(handle,
+                       dirfsp,
+                       smb_fname,
+                       0);
 }
 
 static int fruit_chmod(vfs_handle_struct *handle,