summaryrefslogtreecommitdiffstats
path: root/recipes-security/selinux/libsemanage/libsemanage-Fix-execve-segfaults-on-Ubuntu.patch
blob: daaeb3bcbe5245201dc9ab631e8f0f1d91300f2a (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
31
32
33
34
From a91134e98ba4b3b6645d12bb68a07976b60f86c8 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

Upstream-Status: Inappropriate [embedded specific]

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
 src/semanage_store.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/semanage_store.c b/src/semanage_store.c
index 27c5d34..519f298 100644
--- a/src/semanage_store.c
+++ b/src/semanage_store.c
@@ -1470,7 +1470,7 @@ static int semanage_exec_prog(semanage_handle_t * sh,
 	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 */
 	}
 
-- 
2.25.1