]>
Commit | Line | Data |
---|---|---|
3b4f425a RY |
1 | dnl # |
2 | dnl # 2.6.39 API change, | |
3 | dnl # The is_owner_or_cap() macro was renamed to inode_owner_or_capable(), | |
4 | dnl # This is used for permission checks in the xattr and file attribute call | |
5 | dnl # paths. | |
6 | dnl # | |
608f8749 BB |
7 | AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OWNER_OR_CAPABLE], [ |
8 | ZFS_LINUX_TEST_SRC([inode_owner_or_capable], [ | |
3b4f425a RY |
9 | #include <linux/fs.h> |
10 | ],[ | |
11 | struct inode *ip = NULL; | |
12 | (void) inode_owner_or_capable(ip); | |
608f8749 BB |
13 | ]) |
14 | ||
15 | ||
16 | ZFS_LINUX_TEST_SRC([is_owner_or_cap], [ | |
17 | #include <linux/fs.h> | |
18 | #include <linux/sched.h> | |
3b4f425a | 19 | ],[ |
608f8749 BB |
20 | struct inode *ip = NULL; |
21 | (void) is_owner_or_cap(ip); | |
22 | ]) | |
23 | ]) | |
24 | ||
25 | AC_DEFUN([ZFS_AC_KERNEL_INODE_OWNER_OR_CAPABLE], [ | |
26 | AC_MSG_CHECKING([whether inode_owner_or_capable() exists]) | |
27 | ZFS_LINUX_TEST_RESULT([inode_owner_or_capable], [ | |
3b4f425a RY |
28 | AC_MSG_RESULT(yes) |
29 | AC_DEFINE(HAVE_INODE_OWNER_OR_CAPABLE, 1, | |
30 | [inode_owner_or_capable() exists]) | |
31 | ],[ | |
32 | AC_MSG_RESULT(no) | |
33 | AC_MSG_CHECKING([whether is_owner_or_cap() exists]) | |
608f8749 BB |
34 | |
35 | ZFS_LINUX_TEST_RESULT([is_owner_or_cap], [ | |
3b4f425a RY |
36 | AC_MSG_RESULT(yes) |
37 | AC_DEFINE(HAVE_IS_OWNER_OR_CAP, 1, | |
38 | [is_owner_or_cap() exists]) | |
39 | ],[ | |
608f8749 | 40 | ZFS_LINUX_TEST_ERROR([capability]) |
3b4f425a RY |
41 | ]) |
42 | ]) | |
43 | ]) |