summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorRoy Li <rongqing.li@windriver.com>2013-10-23 17:05:41 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-10-30 13:39:03 +0000
commit9032c10cc882a96acdfd0739f090d121ab625a18 (patch)
tree9ffc043f794159b47cae84163bc2ffd57e2ef52c /meta
parenta738580b108ae11519176e9302913dbd06f0742d (diff)
downloadopenembedded-core-9032c10cc882a96acdfd0739f090d121ab625a18.tar.gz
openembedded-core-9032c10cc882a96acdfd0739f090d121ab625a18.tar.bz2
openembedded-core-9032c10cc882a96acdfd0739f090d121ab625a18.zip
libcap: fix CAP_LAST_CAP
Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-support/libcap/libcap.inc3
-rw-r--r--meta/recipes-support/libcap/libcap/fix-CAP_LAST_CAP.patch39
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)}"
# attr and pam are disabled by EXTRA_OEMAKE_class-native
DEPENDS_class-native = "perl-native-runtime"
-SRC_URI = "${DEBIAN_MIRROR}/main/libc/libcap2/${BPN}2_${PV}.orig.tar.gz"
+SRC_URI = "${DEBIAN_MIRROR}/main/libc/libcap2/${BPN}2_${PV}.orig.tar.gz \
+ file://fix-CAP_LAST_CAP.patch"
PR = "r1"
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 @@
+fix CAP_LAST_CAP
+
+Upstream-Status: pending
+
+Two new capability CAP_BLOCK_SUSPEND and CAP_WAKE_ALARM have been added into
+kernel, but libcap did not update them.
+Once libcap uses its capability.h (the default value of KERNEL_HEADERS), and
+application always use capability.h from kernel, that will make cap_get_flag
+return wrong value.
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ libcap/include/linux/capability.h | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/libcap/include/linux/capability.h b/libcap/include/linux/capability.h
+index 4924f2a..57026be 100644
+--- a/libcap/include/linux/capability.h
++++ b/libcap/include/linux/capability.h
+@@ -360,7 +360,15 @@ struct cpu_vfs_cap_data {
+ CAP_SYS_ADMIN is not acceptable anymore. */
+ #define CAP_SYSLOG 34
+
+-#define CAP_LAST_CAP CAP_SYSLOG
++/* Allow triggering something that will wake the system */
++
++#define CAP_WAKE_ALARM 35
++
++/* Allow preventing system suspends */
++
++#define CAP_BLOCK_SUSPEND 36
++
++#define CAP_LAST_CAP CAP_BLOCK_SUSPEND
+
+ #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP)
+
+--
+1.7.10.4
+