From: Jeremy Allison Date: Tue, 17 Sep 2019 00:50:17 +0000 (-0700) Subject: s3: VFS: vfs_acl_common: Add dirfsp, flags parameters to unlink_acl_common(). X-Git-Tag: talloc-2.3.1~619 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63d814047f7cf04be2ab0ab2b235d58d22cfbaa2;p=thirdparty%2Fsamba.git s3: VFS: vfs_acl_common: Add dirfsp, flags parameters to unlink_acl_common(). Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- 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; }