Add -p switch to "zpool get"
[zfs.git] / config / kernel-security-inode-init.m4
1 dnl #
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.
7 dnl #
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>
12         ],[
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;
19
20                 security_inode_init_security(ip, dip, str, &name, &value, &len);
21         ],[
22                 AC_MSG_RESULT(yes)
23                 AC_DEFINE(HAVE_6ARGS_SECURITY_INODE_INIT_SECURITY, 1,
24                           [security_inode_init_security wants 6 args])
25         ],[
26                 AC_MSG_RESULT(no)
27         ])
28 ])
29
30 dnl #
31 dnl # 3.2 API change
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.
36 dnl #
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>
41         ],[
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;
46
47                 security_inode_init_security(ip, dip, str, func, NULL);
48         ],[
49                 AC_MSG_RESULT(yes)
50                 AC_DEFINE(HAVE_CALLBACK_SECURITY_INODE_INIT_SECURITY, 1,
51                           [security_inode_init_security wants callback])
52         ],[
53                 AC_MSG_RESULT(no)
54         ])
55 ])