mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Cross-platform acltype
The acltype property is currently hidden on FreeBSD and does not reflect the NFSv4 style ZFS ACLs used on the platform. This makes it difficult to observe that a pool imported from FreeBSD on Linux has a different type of ACL that is being ignored, and vice versa. Add an nfsv4 acltype and expose the property on FreeBSD. Make the default acltype nfsv4 on FreeBSD. Setting acltype to an unhanded style is treated the same as setting it to off. The ACLs will not be removed, but they will be ignored. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #10520
This commit is contained in:
committed by
Brian Behlendorf
parent
fbfc7e843a
commit
725c9e22ca
@@ -2666,7 +2666,7 @@ zfs_zaccess(znode_t *zp, int mode, int flags, boolean_t skipaclchk, cred_t *cr)
|
||||
|
||||
/*
|
||||
* Translate traditional unix S_IRUSR/S_IWUSR/S_IXUSR mode into
|
||||
* native ACL format and call zfs_zaccess()
|
||||
* NFSv4-style ZFS ACL format and call zfs_zaccess()
|
||||
*/
|
||||
int
|
||||
zfs_zaccess_rwx(znode_t *zp, mode_t mode, int flags, cred_t *cr)
|
||||
|
||||
@@ -352,6 +352,7 @@ acltype_changed_cb(void *arg, uint64_t newval)
|
||||
zfsvfs_t *zfsvfs = arg;
|
||||
|
||||
switch (newval) {
|
||||
case ZFS_ACLTYPE_NFSV4:
|
||||
case ZFS_ACLTYPE_OFF:
|
||||
zfsvfs->z_acl_type = ZFS_ACLTYPE_OFF;
|
||||
zfsvfs->z_sb->s_flags &= ~SB_POSIXACL;
|
||||
|
||||
Reference in New Issue
Block a user