1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

s3/modules: make chmod_acl_module_common less strict so fchmod can run

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Noel Power 2021-04-07 16:02:15 +01:00 committed by Noel Power
parent a749da2a5d
commit 74ecb46707

View File

@ -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);
}