From 023699cd62eb033ebed5e5fae4e13acaba4c5461 Mon Sep 17 00:00:00 2001 From: Massimo Maggi Date: Mon, 28 Oct 2013 09:22:15 -0700 Subject: Posix ACL Support This change adds support for Posix ACLs by storing them as an xattr which is common practice for many Linux file systems. Since the Posix ACL is stored as an xattr it will not overwrite any existing ZFS/NFSv4 ACLs which may have been set. The Posix ACL will also be non-functional on other platforms although it may be visible as an xattr if that platform understands SA based xattrs. By default Posix ACLs are disabled but they may be enabled with the new 'aclmode=noacl|posixacl' property. Set the property to 'posixacl' to enable them. If ZFS/NFSv4 ACL support is ever added an appropriate acltype will be added. This change passes the POSIX Test Suite cleanly with the exception of xacl/00.t test 45 which is incorrect for Linux (Ext4 fails too). http://www.tuxera.com/community/posix-test-suite/ Signed-off-by: Massimo Maggi Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Closes #170 --- include/sys/zfs_ioctl.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/sys/zfs_ioctl.h') diff --git a/include/sys/zfs_ioctl.h b/include/sys/zfs_ioctl.h index 8838322a9..0ee6cc1cd 100644 --- a/include/sys/zfs_ioctl.h +++ b/include/sys/zfs_ioctl.h @@ -61,6 +61,11 @@ extern "C" { */ #define ZFS_SNAPDEV_HIDDEN 0 #define ZFS_SNAPDEV_VISIBLE 1 +/* + * Property values for acltype + */ +#define ZFS_ACLTYPE_OFF 0 +#define ZFS_ACLTYPE_POSIXACL 1 /* * Field manipulation macros for the drr_versioninfo field of the -- cgit v1.2.3