2 dnl # 2.6.39 API change
3 dnl # The security_inode_init_security() function now takes an additional
4 dnl # qstr argument which must be passed in from the dentry if available.
5 dnl # Passing a NULL is safe when no qstr is available the relevant
6 dnl # security checks will just be skipped.
8 AC_DEFUN([ZFS_AC_KERNEL_6ARGS_SECURITY_INODE_INIT_SECURITY], [
9 AC_MSG_CHECKING([whether security_inode_init_security wants 6 args])
10 ZFS_LINUX_TRY_COMPILE([
11 #include <linux/security.h>
13 struct inode *ip __attribute__ ((unused)) = NULL;
14 struct inode *dip __attribute__ ((unused)) = NULL;
15 const struct qstr *str __attribute__ ((unused)) = NULL;
16 char *name __attribute__ ((unused)) = NULL;
17 void *value __attribute__ ((unused)) = NULL;
18 size_t len __attribute__ ((unused)) = 0;
20 security_inode_init_security(ip, dip, str, &name, &value, &len);
23 AC_DEFINE(HAVE_6ARGS_SECURITY_INODE_INIT_SECURITY, 1,
24 [security_inode_init_security wants 6 args])
32 dnl # The security_inode_init_security() API has been changed to include
33 dnl # a filesystem specific callback to write security extended attributes.
34 dnl # This was done to support the initialization of multiple LSM xattrs
35 dnl # and the EVM xattr.
37 AC_DEFUN([ZFS_AC_KERNEL_CALLBACK_SECURITY_INODE_INIT_SECURITY], [
38 AC_MSG_CHECKING([whether security_inode_init_security wants callback])
39 ZFS_LINUX_TRY_COMPILE([
40 #include <linux/security.h>
42 struct inode *ip __attribute__ ((unused)) = NULL;
43 struct inode *dip __attribute__ ((unused)) = NULL;
44 const struct qstr *str __attribute__ ((unused)) = NULL;
45 initxattrs func __attribute__ ((unused)) = NULL;
47 security_inode_init_security(ip, dip, str, func, NULL);
50 AC_DEFINE(HAVE_CALLBACK_SECURITY_INODE_INIT_SECURITY, 1,
51 [security_inode_init_security wants callback])