summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXin Ouyang <Xin.Ouyang@windriver.com>2012-03-27 17:25:28 +0800
committerXin Ouyang <Xin.Ouyang@windriver.com>2012-03-27 17:25:28 +0800
commit7d48098c805301f16727dacf855f391a13e7f140 (patch)
tree21751a67b6a0ea939fe88e5e4a79b341ae284b87
parent4c22ee425203d4b19e495403cf59437026f874ed (diff)
downloadmeta-selinux-7d48098c805301f16727dacf855f391a13e7f140.tar.gz
libsemanage: Patch to fix segfaults on Ubuntu.
-rw-r--r--recipes-security/selinux/libsemanage/libsemanage-Fix-execve-segfaults-on-Ubuntu.patch30
-rw-r--r--recipes-security/selinux/libsemanage_2.1.6.bb1
2 files changed, 31 insertions, 0 deletions
diff --git a/recipes-security/selinux/libsemanage/libsemanage-Fix-execve-segfaults-on-Ubuntu.patch b/recipes-security/selinux/libsemanage/libsemanage-Fix-execve-segfaults-on-Ubuntu.patch
new file mode 100644
index 0000000..5198124
--- /dev/null
+++ b/recipes-security/selinux/libsemanage/libsemanage-Fix-execve-segfaults-on-Ubuntu.patch
@@ -0,0 +1,30 @@
1From 35aa581aa734d8d93dc5e08bc02d32fa3b50fae2 Mon Sep 17 00:00:00 2001
2From: Xin Ouyang <Xin.Ouyang@windriver.com>
3Date: Mon, 26 Mar 2012 15:15:16 +0800
4Subject: [PATCH] libsemanage: Fix execve segfaults on Ubuntu.
5
6semanage_exec_prog() has pass NULL as param 2 to call execve(),
7this may cause segfaults on Ubuntu.
8Such as "make load" while building refpolicy.
9
10http://oss.tresys.com/pipermail/refpolicy/2011-December/004859.html
11---
12 src/semanage_store.c | 2 +-
13 1 files changed, 1 insertions(+), 1 deletions(-)
14
15diff --git a/src/semanage_store.c b/src/semanage_store.c
16index a223aa7..c0af87d 100644
17--- a/src/semanage_store.c
18+++ b/src/semanage_store.c
19@@ -1015,7 +1015,7 @@ static int semanage_exec_prog(semanage_handle_t * sh,
20 } else if (forkval == 0) {
21 /* child process. file descriptors will be closed
22 * because they were set as close-on-exec. */
23- execve(e->path, argv, NULL);
24+ execv(e->path, argv);
25 _exit(EXIT_FAILURE); /* if execve() failed */
26 } else {
27 /* parent process. wait for child to finish */
28--
291.7.5.4
30
diff --git a/recipes-security/selinux/libsemanage_2.1.6.bb b/recipes-security/selinux/libsemanage_2.1.6.bb
index 8359e68..faddbe0 100644
--- a/recipes-security/selinux/libsemanage_2.1.6.bb
+++ b/recipes-security/selinux/libsemanage_2.1.6.bb
@@ -17,6 +17,7 @@ SRC_URI[sha256sum] = "64e6849fe50fb463ec0ba24653a26e3452fa4aaa7d7e192213d5c5a7c5
17DEPENDS += "libsepol libselinux ustr bzip2 python" 17DEPENDS += "libsepol libselinux ustr bzip2 python"
18 18
19SRC_URI += "file://Fix-segfault-for-standard-policy.patch" 19SRC_URI += "file://Fix-segfault-for-standard-policy.patch"
20SRC_URI += "file://libsemanage-Fix-execve-segfaults-on-Ubuntu.patch"
20 21
21PACKAGES += "${PN}-python" 22PACKAGES += "${PN}-python"
22FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" 23FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"