diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2014-12-01 12:25:24 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-12-03 14:28:21 +0100 |
commit | 6468d9f2bb30147967a724075c504afb3481d465 (patch) | |
tree | 21239cd12f04617364b30ba932e1a0b6c1fd0b8c /src/providers | |
parent | 9d501b05b47a63e29c586c6dd3d40ac615a98886 (diff) | |
download | sssd-6468d9f2bb30147967a724075c504afb3481d465.tar.gz sssd-6468d9f2bb30147967a724075c504afb3481d465.tar.xz sssd-6468d9f2bb30147967a724075c504afb3481d465.zip |
Add extra_args to exec_child()
Related:
https://fedorahosted.org/sssd/ticket/2503
Currently all child processes use the same arguments, the construction
of argv[] is even hardcoded in exec_child(). Add an extra_args[] array
that extends the common set of argvs so that we can have child-specific
arguments. Also adds a unit test.
Reviewed-by: Sumit Bose <sbose@redhat.com>
Diffstat (limited to 'src/providers')
-rw-r--r-- | src/providers/ad/ad_gpo.c | 2 | ||||
-rw-r--r-- | src/providers/ipa/ipa_selinux.c | 3 | ||||
-rw-r--r-- | src/providers/krb5/krb5_child_handler.c | 3 | ||||
-rw-r--r-- | src/providers/ldap/sdap_child_helpers.c | 3 |
4 files changed, 7 insertions, 4 deletions
diff --git a/src/providers/ad/ad_gpo.c b/src/providers/ad/ad_gpo.c index 83edbe4fb..62715861c 100644 --- a/src/providers/ad/ad_gpo.c +++ b/src/providers/ad/ad_gpo.c @@ -3960,7 +3960,7 @@ gpo_fork_child(struct tevent_req *req) if (pid == 0) { /* child */ err = exec_child(state, pipefd_to_child, pipefd_from_child, - GPO_CHILD, gpo_child_debug_fd); + GPO_CHILD, gpo_child_debug_fd, NULL); DEBUG(SSSDBG_CRIT_FAILURE, "Could not exec gpo_child: [%d][%s].\n", err, strerror(err)); return err; diff --git a/src/providers/ipa/ipa_selinux.c b/src/providers/ipa/ipa_selinux.c index 30ad6f0a7..531258dac 100644 --- a/src/providers/ipa/ipa_selinux.c +++ b/src/providers/ipa/ipa_selinux.c @@ -1036,7 +1036,8 @@ static errno_t selinux_fork_child(struct selinux_child_state *state) if (pid == 0) { /* child */ ret = exec_child(state, pipefd_to_child, pipefd_from_child, - SELINUX_CHILD, selinux_child_debug_fd); + SELINUX_CHILD, selinux_child_debug_fd, + NULL); DEBUG(SSSDBG_CRIT_FAILURE, "Could not exec selinux_child: [%d][%s].\n", ret, sss_strerror(ret)); return ret; diff --git a/src/providers/krb5/krb5_child_handler.c b/src/providers/krb5/krb5_child_handler.c index 93961172c..9bb61f654 100644 --- a/src/providers/krb5/krb5_child_handler.c +++ b/src/providers/krb5/krb5_child_handler.c @@ -299,7 +299,8 @@ static errno_t fork_child(struct tevent_req *req) if (pid == 0) { /* child */ err = exec_child(state, pipefd_to_child, pipefd_from_child, - KRB5_CHILD, state->kr->krb5_ctx->child_debug_fd); + KRB5_CHILD, state->kr->krb5_ctx->child_debug_fd, + NULL); if (err != EOK) { DEBUG(SSSDBG_CRIT_FAILURE, "Could not exec KRB5 child: [%d][%s].\n", err, strerror(err)); diff --git a/src/providers/ldap/sdap_child_helpers.c b/src/providers/ldap/sdap_child_helpers.c index 400109890..b60891d2b 100644 --- a/src/providers/ldap/sdap_child_helpers.c +++ b/src/providers/ldap/sdap_child_helpers.c @@ -108,7 +108,8 @@ static errno_t sdap_fork_child(struct tevent_context *ev, if (pid == 0) { /* child */ err = exec_child(child, pipefd_to_child, pipefd_from_child, - LDAP_CHILD, ldap_child_debug_fd); + LDAP_CHILD, ldap_child_debug_fd, + NULL); DEBUG(SSSDBG_CRIT_FAILURE, "Could not exec LDAP child: [%d][%s].\n", err, strerror(err)); return err; |