#define posix_acl_from_xattr(a,b,c) posix_acl_from_xattr(b,c)
#define posix_acl_to_xattr(a,b,c,d) posix_acl_to_xattr(b,c,d)
#endif
+
+#ifndef HAVE_POSIX_ACL_VALID_USER_NS
+#define posix_acl_valid(a,b) posix_acl_valid(b)
+#endif
#endif
]) # LC_HAVE_IN_COMPAT_SYSCALL
#
+# LC_HAVE_POSIX_ACL_VALID_USER_NS
+#
+# 4.8 posix_acl_valid takes struct user_namespace
+#
+AC_DEFUN([LC_HAVE_POSIX_ACL_VALID_USER_NS], [
+LB_CHECK_COMPILE([if 'posix_acl_valid' takes 'struct user_namespace'],
+posix_acl_valid, [
+ #include <linux/fs.h>
+ #include <linux/posix_acl.h>
+],[
+ posix_acl_valid((struct user_namespace*)NULL, (const struct posix_acl*)NULL);
+],[
+ AC_DEFINE(HAVE_POSIX_ACL_VALID_USER_NS, 1,
+ [posix_acl_valid takes struct user_namespace])
+])
+]) # LC_HAVE_POSIX_ACL_VALID_USER_NS
+
+#
# LC_PROG_LINUX
#
# Lustre linux kernel checks
# 4.6
LC_HAVE_IN_COMPAT_SYSCALL
+ # 4.8
+ LC_HAVE_POSIX_ACL_VALID_USER_NS
+
#
AS_IF([test "x$enable_server" != xno], [
LC_FUNC_DEV_SET_RDONLY
RETURN(rc);
}
- rc = posix_acl_valid(acl);
+ rc = posix_acl_valid(&init_user_ns, acl);
if (rc) {
CERROR("validate acl: %d\n", rc);
posix_acl_release(acl);