From: Cyril H. <su...@li...> - 2013-09-26 11:51:14
|
The branch, master, has been updated via 7f5bfb8ff65dfb8f910e25de65bf68291488924c (commit) from 5cdeb8d4b889e7b25ba8a9754243474bef5798d3 (commit) - Log ----------------------------------------------------------------- commit 7f5bfb8ff65dfb8f910e25de65bf68291488924c Author: MaShimiao <mas...@cn...> Date: Thu Sep 26 17:42:02 2013 +0800 setuid/setuid04.c: Fix a double cleanup() error The cleanup() may be called twice by both the parent and child process in this testcase leading to a failure. This patch makes sure cleanup() is called only once by parent process. Signed-off-by: Zeng Linggang <zen...@cn...> Signed-off-by: Ma Shimiao <mas...@cn...> Reviewed-by: Cyril Hrubis <ch...@su...> ----------------------------------------------------------------------- Summary of changes: testcases/kernel/syscalls/setuid/setuid04.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/testcases/kernel/syscalls/setuid/setuid04.c b/testcases/kernel/syscalls/setuid/setuid04.c index d8e991e..365859b 100644 --- a/testcases/kernel/syscalls/setuid/setuid04.c +++ b/testcases/kernel/syscalls/setuid/setuid04.c @@ -88,7 +88,7 @@ static void do_master_child(void) int pid; int status; - if (SETUID(cleanup, ltpuser->pw_uid) == -1) { + if (SETUID(NULL, ltpuser->pw_uid) == -1) { tst_brkm(TBROK, NULL, "setuid failed to set the effective uid to %d", ltpuser->pw_uid); hooks/post-receive -- ltp |