]> git.proxmox.com Git - mirror_zfs.git/commit
Prevent zfs_acl_chmod() if aclmode restricted and ACL inherited
authorAndrew <awalker@ixsystems.com>
Sun, 23 Aug 2020 04:49:25 +0000 (00:49 -0400)
committerGitHub <noreply@github.com>
Sun, 23 Aug 2020 04:49:25 +0000 (21:49 -0700)
commita741b386d3ce195fd3eb2e98066f9abffbbace89
tree6ebcc92fa8fa3f42673c9cd09fd155c30052b9ab
parentab4a78c7444fc6fa410261166f1b75e50d8be872
Prevent zfs_acl_chmod() if aclmode restricted and ACL inherited

In absence of inheriting entry for owner@, group@, or everyone@,
zfs_acl_chmod() is called to set these. This can cause confusion for Samba
admins who do not expect these entries to appear on newly created files and
directories once they have been stripped from from the parent directory.

When aclmode is set to "restricted", chmod is prevented on non-trivial ACLs.
It is not a stretch to assume that in this case the administrator does not want
ZFS to add the missing special entries. Add check for this aclmode, and if an
inherited entry is present skip zfs_acl_chmod().

Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Andrew Walker <awalker@ixsystems.com>
Closes #10748
module/os/freebsd/zfs/zfs_acl.c
module/os/linux/zfs/zfs_acl.c