mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
s3: VFS: Change rmdir_acl_common() to take a files_struct *dirfsp pointer.
Pass in the passed dirfsp if available, else handle->conn->cwd_fsp. No logic changes. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
1c0c3b6103
commit
7f54bc8794
@ -1186,7 +1186,8 @@ static int acl_common_remove_object(vfs_handle_struct *handle,
|
||||
}
|
||||
|
||||
int rmdir_acl_common(struct vfs_handle_struct *handle,
|
||||
const struct smb_filename *smb_fname)
|
||||
struct files_struct *dirfsp,
|
||||
const struct smb_filename *smb_fname)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
@ -33,7 +33,8 @@ bool init_acl_common_config(vfs_handle_struct *handle,
|
||||
const char *module_name);
|
||||
|
||||
int rmdir_acl_common(struct vfs_handle_struct *handle,
|
||||
const struct smb_filename *smb_fname);
|
||||
struct files_struct *dirfsp,
|
||||
const struct smb_filename *smb_fname);
|
||||
int unlink_acl_common(struct vfs_handle_struct *handle,
|
||||
struct files_struct *dirfsp,
|
||||
const struct smb_filename *smb_fname,
|
||||
|
@ -263,7 +263,9 @@ static int unlinkat_acl_tdb(vfs_handle_struct *handle,
|
||||
}
|
||||
|
||||
if (flags & AT_REMOVEDIR) {
|
||||
ret = rmdir_acl_common(handle, smb_fname_tmp);
|
||||
ret = rmdir_acl_common(handle,
|
||||
dirfsp,
|
||||
smb_fname_tmp);
|
||||
} else {
|
||||
ret = unlink_acl_common(handle,
|
||||
dirfsp,
|
||||
@ -297,7 +299,9 @@ static int rmdir_acl_tdb(vfs_handle_struct *handle,
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = rmdir_acl_common(handle, smb_fname);
|
||||
ret = rmdir_acl_common(handle,
|
||||
handle->conn->cwd_fsp,
|
||||
smb_fname);
|
||||
if (ret == -1) {
|
||||
return -1;
|
||||
}
|
||||
|
@ -286,7 +286,9 @@ static int acl_xattr_unlinkat(vfs_handle_struct *handle,
|
||||
int ret;
|
||||
|
||||
if (flags & AT_REMOVEDIR) {
|
||||
ret = rmdir_acl_common(handle, smb_fname);
|
||||
ret = rmdir_acl_common(handle,
|
||||
dirfsp,
|
||||
smb_fname);
|
||||
} else {
|
||||
ret = unlink_acl_common(handle,
|
||||
dirfsp,
|
||||
@ -299,7 +301,9 @@ static int acl_xattr_unlinkat(vfs_handle_struct *handle,
|
||||
static int acl_xattr_rmdir(vfs_handle_struct *handle,
|
||||
const struct smb_filename *smb_dname)
|
||||
{
|
||||
return rmdir_acl_common(handle, smb_dname);
|
||||
return rmdir_acl_common(handle,
|
||||
handle->conn->cwd_fsp,
|
||||
smb_dname);
|
||||
}
|
||||
|
||||
static NTSTATUS acl_xattr_fget_nt_acl(vfs_handle_struct *handle,
|
||||
|
Loading…
x
Reference in New Issue
Block a user