diff options
author | Xin Ouyang <Xin.Ouyang@windriver.com> | 2012-03-27 17:25:28 +0800 |
---|---|---|
committer | Xin Ouyang <Xin.Ouyang@windriver.com> | 2012-03-27 17:25:28 +0800 |
commit | 7d48098c805301f16727dacf855f391a13e7f140 (patch) | |
tree | 21751a67b6a0ea939fe88e5e4a79b341ae284b87 | |
parent | 4c22ee425203d4b19e495403cf59437026f874ed (diff) | |
download | meta-selinux-7d48098c805301f16727dacf855f391a13e7f140.tar.gz |
libsemanage: Patch to fix segfaults on Ubuntu.
-rw-r--r-- | recipes-security/selinux/libsemanage/libsemanage-Fix-execve-segfaults-on-Ubuntu.patch | 30 | ||||
-rw-r--r-- | recipes-security/selinux/libsemanage_2.1.6.bb | 1 |
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 @@ | |||
1 | From 35aa581aa734d8d93dc5e08bc02d32fa3b50fae2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> | ||
3 | Date: Mon, 26 Mar 2012 15:15:16 +0800 | ||
4 | Subject: [PATCH] libsemanage: Fix execve segfaults on Ubuntu. | ||
5 | |||
6 | semanage_exec_prog() has pass NULL as param 2 to call execve(), | ||
7 | this may cause segfaults on Ubuntu. | ||
8 | Such as "make load" while building refpolicy. | ||
9 | |||
10 | http://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 | |||
15 | diff --git a/src/semanage_store.c b/src/semanage_store.c | ||
16 | index 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 | -- | ||
29 | 1.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 | |||
17 | DEPENDS += "libsepol libselinux ustr bzip2 python" | 17 | DEPENDS += "libsepol libselinux ustr bzip2 python" |
18 | 18 | ||
19 | SRC_URI += "file://Fix-segfault-for-standard-policy.patch" | 19 | SRC_URI += "file://Fix-segfault-for-standard-policy.patch" |
20 | SRC_URI += "file://libsemanage-Fix-execve-segfaults-on-Ubuntu.patch" | ||
20 | 21 | ||
21 | PACKAGES += "${PN}-python" | 22 | PACKAGES += "${PN}-python" |
22 | FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" | 23 | FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" |