mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
OpenZFS 3254 - add support in zfs for aclmode=restricted
Authored-by: Paul B. Henson <henson@acm.org> Reviewed by: Albert Lee <trisk@nexenta.com> Reviewed by: Gordon Ross <gwr@nexenta.com> Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov> Approved by: Richard Lowe <richlowe@richlowe.net> Ported-by: Paul B. Henson <henson@acm.org> OpenZFS-issue: https://www.illumos.org/issues/3254 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/71dbfc287c Closes #10266
This commit is contained in:
committed by
Brian Behlendorf
parent
a1af567bb6
commit
7bf3e1fa0f
@@ -3077,6 +3077,12 @@ top:
|
||||
uint64_t acl_obj;
|
||||
new_mode = (pmode & S_IFMT) | (vap->va_mode & ~S_IFMT);
|
||||
|
||||
if (ZTOZSB(zp)->z_acl_mode == ZFS_ACL_RESTRICTED &&
|
||||
!(zp->z_pflags & ZFS_ACL_TRIVIAL)) {
|
||||
err = EPERM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if ((err = zfs_acl_chmod_setattr(zp, &aclp, new_mode)))
|
||||
goto out;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user