mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s3: VFS: vfs_acl_common: Add dirfsp, flags parameters to unlink_acl_common().
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
6ef40bdb94
commit
63d814047f
@ -1204,7 +1204,9 @@ int rmdir_acl_common(struct vfs_handle_struct *handle,
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
|
@ -35,7 +35,9 @@ bool init_acl_common_config(vfs_handle_struct *handle,
|
||||
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);
|
||||
|
@ -260,7 +260,10 @@ static int unlink_acl_tdb(vfs_handle_struct *handle,
|
||||
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;
|
||||
@ -303,7 +306,10 @@ static int unlinkat_acl_tdb(vfs_handle_struct *handle,
|
||||
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) {
|
||||
|
@ -281,7 +281,10 @@ static int connect_acl_xattr(struct vfs_handle_struct *handle,
|
||||
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,
|
||||
@ -294,7 +297,10 @@ 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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user