From: Noel Power Date: Wed, 7 Apr 2021 15:02:15 +0000 (+0100) Subject: s3/modules: make chmod_acl_module_common less strict so fchmod can run X-Git-Tag: tevent-0.11.0~1224 X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=74ecb467073fed08635929c82c0a9e9d70428433;p=samba.git s3/modules: make chmod_acl_module_common less strict so fchmod can run Signed-off-by: Noel Power Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c index db6f40d3adf..f5933e68ae1 100644 --- a/source3/modules/vfs_acl_common.c +++ b/source3/modules/vfs_acl_common.c @@ -1374,7 +1374,8 @@ int chmod_acl_module_common(struct vfs_handle_struct *handle, int fchmod_acl_module_common(struct vfs_handle_struct *handle, struct files_struct *fsp, mode_t mode) { - if (fsp->posix_flags & FSP_POSIX_FLAGS_OPEN) { + if (fsp->posix_flags & FSP_POSIX_FLAGS_PATHNAMES + || fsp->fsp_name->flags & SMB_FILENAME_POSIX_PATH) { /* Only allow this on POSIX opens. */ return SMB_VFS_NEXT_FCHMOD(handle, fsp, mode); }