From c87bef28e768e2f6bc8612a768ebf9099d156576 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 --- 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 6158d08..1923f0f 100644 --- a/src/semanage_store.c +++ b/src/semanage_store.c @@ -1405,7 +1405,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 */ }