From 01a37b94a1f5605a395e8b45ee9ec653ce716c06 Mon Sep 17 00:00:00 2001 From: Xin Ouyang 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: Pending Signed-off-by: Yi Zhao --- 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 58dded6..1a94545 100644 --- a/src/semanage_store.c +++ b/src/semanage_store.c @@ -1441,7 +1441,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.7.4