summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2016-01-14 13:33:53 +0100
committerJakub Hrozek <jhrozek@redhat.com>2016-01-19 17:42:07 +0100
commit9dcc7dbf04466cd8cd90aa0bb8acbebef9aca832 (patch)
tree5319a888ab655b440a2432548ed835e1e75210c2 /src/tests
parenta7d2b4f157194c14bc4a40c74f6416b82befa460 (diff)
downloadsssd-9dcc7dbf04466cd8cd90aa0bb8acbebef9aca832.tar.gz
sssd-9dcc7dbf04466cd8cd90aa0bb8acbebef9aca832.tar.xz
sssd-9dcc7dbf04466cd8cd90aa0bb8acbebef9aca832.zip
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 <jhrozek@redhat.com>
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/cmocka/test_child_common.c4
1 files changed, 2 insertions, 2 deletions
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);
}