diff options
author | Roy Li <rongqing.li@windriver.com> | 2013-10-23 17:05:41 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-10-30 13:39:11 +0000 |
commit | 5361ed7cd50a329663141fabdcd7652ce2baf4d4 (patch) | |
tree | 9bbc912a70bc66cdbcd4a679b76f1b21dee7fdb5 /meta/recipes-support | |
parent | f232a944a1fe2e03ce67b060b4148e32447da3fb (diff) | |
download | poky-5361ed7cd50a329663141fabdcd7652ce2baf4d4.tar.gz |
libcap: fix CAP_LAST_CAP
(From OE-Core rev: 9032c10cc882a96acdfd0739f090d121ab625a18)
Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support')
-rw-r--r-- | meta/recipes-support/libcap/libcap.inc | 3 | ||||
-rw-r--r-- | meta/recipes-support/libcap/libcap/fix-CAP_LAST_CAP.patch | 39 |
2 files changed, 41 insertions, 1 deletions
diff --git a/meta/recipes-support/libcap/libcap.inc b/meta/recipes-support/libcap/libcap.inc index 772057f510..1b11b85554 100644 --- a/meta/recipes-support/libcap/libcap.inc +++ b/meta/recipes-support/libcap/libcap.inc | |||
@@ -10,7 +10,8 @@ DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | |||
10 | # attr and pam are disabled by EXTRA_OEMAKE_class-native | 10 | # attr and pam are disabled by EXTRA_OEMAKE_class-native |
11 | DEPENDS_class-native = "perl-native-runtime" | 11 | DEPENDS_class-native = "perl-native-runtime" |
12 | 12 | ||
13 | SRC_URI = "${DEBIAN_MIRROR}/main/libc/libcap2/${BPN}2_${PV}.orig.tar.gz" | 13 | SRC_URI = "${DEBIAN_MIRROR}/main/libc/libcap2/${BPN}2_${PV}.orig.tar.gz \ |
14 | file://fix-CAP_LAST_CAP.patch" | ||
14 | 15 | ||
15 | PR = "r1" | 16 | PR = "r1" |
16 | 17 | ||
diff --git a/meta/recipes-support/libcap/libcap/fix-CAP_LAST_CAP.patch b/meta/recipes-support/libcap/libcap/fix-CAP_LAST_CAP.patch new file mode 100644 index 0000000000..a5571883d3 --- /dev/null +++ b/meta/recipes-support/libcap/libcap/fix-CAP_LAST_CAP.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | fix CAP_LAST_CAP | ||
2 | |||
3 | Upstream-Status: pending | ||
4 | |||
5 | Two new capability CAP_BLOCK_SUSPEND and CAP_WAKE_ALARM have been added into | ||
6 | kernel, but libcap did not update them. | ||
7 | Once libcap uses its capability.h (the default value of KERNEL_HEADERS), and | ||
8 | application always use capability.h from kernel, that will make cap_get_flag | ||
9 | return wrong value. | ||
10 | |||
11 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
12 | --- | ||
13 | libcap/include/linux/capability.h | 10 +++++++++- | ||
14 | 1 file changed, 9 insertions(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/libcap/include/linux/capability.h b/libcap/include/linux/capability.h | ||
17 | index 4924f2a..57026be 100644 | ||
18 | --- a/libcap/include/linux/capability.h | ||
19 | +++ b/libcap/include/linux/capability.h | ||
20 | @@ -360,7 +360,15 @@ struct cpu_vfs_cap_data { | ||
21 | CAP_SYS_ADMIN is not acceptable anymore. */ | ||
22 | #define CAP_SYSLOG 34 | ||
23 | |||
24 | -#define CAP_LAST_CAP CAP_SYSLOG | ||
25 | +/* Allow triggering something that will wake the system */ | ||
26 | + | ||
27 | +#define CAP_WAKE_ALARM 35 | ||
28 | + | ||
29 | +/* Allow preventing system suspends */ | ||
30 | + | ||
31 | +#define CAP_BLOCK_SUSPEND 36 | ||
32 | + | ||
33 | +#define CAP_LAST_CAP CAP_BLOCK_SUSPEND | ||
34 | |||
35 | #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP) | ||
36 | |||
37 | -- | ||
38 | 1.7.10.4 | ||
39 | |||