From: Jeremy Allison Date: Fri, 13 Sep 2019 21:10:16 +0000 (-0700) Subject: s3: VFS: vfs_fruit. Add struct files_struct *dirfsp parameter to fruit_unlink_rsrc_st... X-Git-Tag: talloc-2.3.1~599 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3b1d97555910a9782987a6ab6b0b09e8ac50b792;p=thirdparty%2Fsamba.git s3: VFS: vfs_fruit. Add struct files_struct *dirfsp parameter to fruit_unlink_rsrc_stream() and convert to UNLINKAT. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index 2a9e8ab495a..9edfdffff84 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -1823,8 +1823,9 @@ static int fruit_unlink_meta(vfs_handle_struct *handle, } static int fruit_unlink_rsrc_stream(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - bool force_unlink) + struct files_struct *dirfsp, + const struct smb_filename *smb_fname, + bool force_unlink) { int ret; @@ -1860,7 +1861,10 @@ static int fruit_unlink_rsrc_stream(vfs_handle_struct *handle, } } - ret = SMB_VFS_NEXT_UNLINK(handle, smb_fname); + ret = SMB_VFS_NEXT_UNLINKAT(handle, + dirfsp, + smb_fname, + 0); if ((ret != 0) && (errno == ENOENT) && force_unlink) { ret = 0; } @@ -1940,7 +1944,10 @@ static int fruit_unlink_rsrc(vfs_handle_struct *handle, switch (config->rsrc) { case FRUIT_RSRC_STREAM: - rc = fruit_unlink_rsrc_stream(handle, smb_fname, force_unlink); + rc = fruit_unlink_rsrc_stream(handle, + dirfsp, + smb_fname, + force_unlink); break; case FRUIT_RSRC_ADFILE: