diff options
author | Brian Behlendorf <[email protected]> | 2016-08-02 11:11:45 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-08-08 11:46:40 -0700 |
commit | 4b908d32200b6e5c7b5115322b6c8d25e770daa0 (patch) | |
tree | 98cf55b1d7583c68664208992ce9d2cca23ad26c /config | |
parent | e85a6396b0f7f3cb5a76cf88e47fc1334f9162b7 (diff) |
Linux 4.8 compat: posix_acl_valid()
The posix_acl_valid() function has been updated to require a
user namespace. Filesystem callers should normally provide the
user_ns from the super block associcated with the ACL; the
zpl_posix_acl_valid() wrapper has been added for this purpose.
See https://github.com/torvalds/linux/commit/0d4d717f for
complete details.
Signed-off-by: Brian Behlendorf <[email protected]>
Signed-off-by: Nikolay Borisov <[email protected]>
Signed-off-by: Chunwei Chen <[email protected]>
Closes #4922
Diffstat (limited to 'config')
-rw-r--r-- | config/kernel-acl.m4 | 24 | ||||
-rw-r--r-- | config/kernel.m4 | 1 |
2 files changed, 25 insertions, 0 deletions
diff --git a/config/kernel-acl.m4 b/config/kernel-acl.m4 index 6ef80fe5e..d2a1821c5 100644 --- a/config/kernel-acl.m4 +++ b/config/kernel-acl.m4 @@ -98,6 +98,30 @@ AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T], [ ]) dnl # +dnl # 4.8 API change, +dnl # The function posix_acl_valid now must be passed a namespace. +dnl # +AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_VALID_WITH_NS], [ + AC_MSG_CHECKING([whether posix_acl_valid() wants user namespace]) + ZFS_LINUX_TRY_COMPILE([ + #include <linux/fs.h> + #include <linux/posix_acl.h> + ],[ + struct user_namespace *user_ns = NULL; + const struct posix_acl *acl = NULL; + int error; + + error = posix_acl_valid(user_ns, acl); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_POSIX_ACL_VALID_WITH_NS, 1, + [posix_acl_valid() wants user namespace]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +dnl # dnl # 2.6.27 API change, dnl # Check if inode_operations contains the function permission dnl # and expects the nameidata structure to have been removed. diff --git a/config/kernel.m4 b/config/kernel.m4 index 9eec504f8..507e81010 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -43,6 +43,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [ ZFS_AC_KERNEL_POSIX_ACL_RELEASE ZFS_AC_KERNEL_POSIX_ACL_CHMOD ZFS_AC_KERNEL_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T + ZFS_AC_KERNEL_POSIX_ACL_VALID_WITH_NS ZFS_AC_KERNEL_INODE_OPERATIONS_PERMISSION ZFS_AC_KERNEL_INODE_OPERATIONS_PERMISSION_WITH_NAMEIDATA ZFS_AC_KERNEL_INODE_OPERATIONS_CHECK_ACL |