]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: VFS: vfs_fruit. Add files_struct *dirfsp to fruit_unlink_internal() so we can...
authorJeremy Allison <jra@samba.org>
Fri, 13 Sep 2019 20:18:28 +0000 (13:18 -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 38aedbc01e7a99399c7b5f7b904434ed9421a34c..41e7a34fdf9fbd3825ea00824b39a372d6e27aa0 100644 (file)
@@ -1952,6 +1952,7 @@ static int fruit_unlink_rsrc(vfs_handle_struct *handle,
 }
 
 static int fruit_unlink_internal(vfs_handle_struct *handle,
+                       struct files_struct *dirfsp,
                        const struct smb_filename *smb_fname)
 {
        int rc;
@@ -2168,7 +2169,9 @@ exit_rmdir:
 static int fruit_unlink(vfs_handle_struct *handle,
                        const struct smb_filename *smb_fname)
 {
-       return fruit_unlink_internal(handle, smb_fname);
+       return fruit_unlink_internal(handle,
+                               handle->conn->cwd_fsp,
+                               smb_fname);
 }
 
 static int fruit_unlinkat(vfs_handle_struct *handle,
@@ -2182,7 +2185,9 @@ static int fruit_unlinkat(vfs_handle_struct *handle,
        if (flags & AT_REMOVEDIR) {
                ret = fruit_rmdir(handle, smb_fname);
        } else {
-               ret = fruit_unlink_internal(handle, smb_fname);
+               ret = fruit_unlink_internal(handle,
+                               dirfsp,
+                               smb_fname);
        }
        return ret;
 }