}
int unlink_acl_common(struct vfs_handle_struct *handle,
- const struct smb_filename *smb_fname)
+ struct files_struct *dirfsp,
+ const struct smb_filename *smb_fname,
+ int flags)
{
int ret;
int rmdir_acl_common(struct vfs_handle_struct *handle,
const struct smb_filename *smb_fname);
int unlink_acl_common(struct vfs_handle_struct *handle,
- const struct smb_filename *smb_fname);
+ struct files_struct *dirfsp,
+ const struct smb_filename *smb_fname,
+ int flags);
int chmod_acl_module_common(struct vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
mode_t mode);
goto out;
}
- ret = unlink_acl_common(handle, smb_fname_tmp);
+ ret = unlink_acl_common(handle,
+ handle->conn->cwd_fsp,
+ smb_fname_tmp,
+ 0);
if (ret == -1) {
goto out;
if (flags & AT_REMOVEDIR) {
ret = rmdir_acl_common(handle, smb_fname_tmp);
} else {
- ret = unlink_acl_common(handle, smb_fname_tmp);
+ ret = unlink_acl_common(handle,
+ dirfsp,
+ smb_fname_tmp,
+ flags);
}
if (ret == -1) {
static int acl_xattr_unlink(vfs_handle_struct *handle,
const struct smb_filename *smb_fname)
{
- return unlink_acl_common(handle, smb_fname);
+ return unlink_acl_common(handle,
+ handle->conn->cwd_fsp,
+ smb_fname,
+ 0);
}
static int acl_xattr_unlinkat(vfs_handle_struct *handle,
if (flags & AT_REMOVEDIR) {
ret = rmdir_acl_common(handle, smb_fname);
} else {
- ret = unlink_acl_common(handle, smb_fname);
+ ret = unlink_acl_common(handle,
+ dirfsp,
+ smb_fname,
+ flags);
}
return ret;
}