From 9dcc7dbf04466cd8cd90aa0bb8acbebef9aca832 Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Thu, 14 Jan 2016 13:33:53 +0100 Subject: UTIL: allow to skip default options for child processes Currently the SSSD default options like e.g. --debug-level are added unconditionally to the command line options of a child process when started with the child helper functions. If a binary from a different source should be started as a child by SSSD those options might not be known or used differently. This patch adds an option to exec_child_ex() which allows to skip the default options and only add specific options. Reviewed-by: Jakub Hrozek --- src/tests/cmocka/test_child_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tests') diff --git a/src/tests/cmocka/test_child_common.c b/src/tests/cmocka/test_child_common.c index bf500fa5..9ed9c1ae 100644 --- a/src/tests/cmocka/test_child_common.c +++ b/src/tests/cmocka/test_child_common.c @@ -139,7 +139,7 @@ void test_exec_child_extra_args(void **state) ret = exec_child_ex(child_tctx, child_tctx->pipefd_to_child, child_tctx->pipefd_from_child, - CHILD_DIR"/"TEST_BIN, 2, extra_args, + CHILD_DIR"/"TEST_BIN, 2, extra_args, false, STDIN_FILENO, STDOUT_FILENO); assert_int_equal(ret, EOK); } else { @@ -287,7 +287,7 @@ void test_exec_child_echo(void **state) ret = exec_child_ex(child_tctx, child_tctx->pipefd_to_child, child_tctx->pipefd_from_child, - CHILD_DIR"/"TEST_BIN, 2, NULL, + CHILD_DIR"/"TEST_BIN, 2, NULL, false, STDIN_FILENO, 3); assert_int_equal(ret, EOK); } -- cgit