blob: 5198124358a97dbe0d8728e46a081453be04f732 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
From 35aa581aa734d8d93dc5e08bc02d32fa3b50fae2 Mon Sep 17 00:00:00 2001
From: Xin Ouyang <Xin.Ouyang@windriver.com>
Date: Mon, 26 Mar 2012 15:15:16 +0800
Subject: [PATCH] libsemanage: Fix execve segfaults on Ubuntu.
semanage_exec_prog() has pass NULL as param 2 to call execve(),
this may cause segfaults on Ubuntu.
Such as "make load" while building refpolicy.
http://oss.tresys.com/pipermail/refpolicy/2011-December/004859.html
---
src/semanage_store.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/semanage_store.c b/src/semanage_store.c
index a223aa7..c0af87d 100644
--- a/src/semanage_store.c
+++ b/src/semanage_store.c
@@ -1015,7 +1015,7 @@ static int semanage_exec_prog(semanage_handle_t * sh,
} else if (forkval == 0) {
/* child process. file descriptors will be closed
* because they were set as close-on-exec. */
- execve(e->path, argv, NULL);
+ execv(e->path, argv);
_exit(EXIT_FAILURE); /* if execve() failed */
} else {
/* parent process. wait for child to finish */
--
1.7.5.4
|