diff options
author | Jeremy Allison <jra@samba.org> | 2019-09-16 17:50:17 -0700 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2019-09-26 17:20:48 +0000 |
commit | 63d814047f7cf04be2ab0ab2b235d58d22cfbaa2 (patch) | |
tree | 970937057001321216ca2d099a78ad9db7c15d6a /source3 | |
parent | 6ef40bdb94093f2a7afdd0d69bf0467d86660ec8 (diff) | |
download | samba-63d814047f7cf04be2ab0ab2b235d58d22cfbaa2.tar.gz |
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>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/modules/vfs_acl_common.c | 4 | ||||
-rw-r--r-- | source3/modules/vfs_acl_common.h | 4 | ||||
-rw-r--r-- | source3/modules/vfs_acl_tdb.c | 10 | ||||
-rw-r--r-- | source3/modules/vfs_acl_xattr.c | 10 |
4 files changed, 22 insertions, 6 deletions
diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c index 315dc2bd761..a9d53ff6857 100644 --- a/source3/modules/vfs_acl_common.c +++ b/source3/modules/vfs_acl_common.c @@ -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; diff --git a/source3/modules/vfs_acl_common.h b/source3/modules/vfs_acl_common.h index f8bc48bf65b..d36e68c161b 100644 --- a/source3/modules/vfs_acl_common.h +++ b/source3/modules/vfs_acl_common.h @@ -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); diff --git a/source3/modules/vfs_acl_tdb.c b/source3/modules/vfs_acl_tdb.c index 451eb4cf23a..0e98244ef35 100644 --- a/source3/modules/vfs_acl_tdb.c +++ b/source3/modules/vfs_acl_tdb.c @@ -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) { diff --git a/source3/modules/vfs_acl_xattr.c b/source3/modules/vfs_acl_xattr.c index 82eef211b4b..37c15ece8cd 100644 --- a/source3/modules/vfs_acl_xattr.c +++ b/source3/modules/vfs_acl_xattr.c @@ -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; } |