diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2015-01-07 10:36:12 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-01-13 17:50:05 +0100 |
commit | d31fba405f3392f27f0eea861834083cfaa0ef10 (patch) | |
tree | 54d87d664d934d3e8edc4403655b61febd894138 /src/providers/krb5 | |
parent | 9740d8a555dee2e41294f6e4acf558e4998656d9 (diff) | |
download | sssd-d31fba405f3392f27f0eea861834083cfaa0ef10.tar.gz sssd-d31fba405f3392f27f0eea861834083cfaa0ef10.tar.xz sssd-d31fba405f3392f27f0eea861834083cfaa0ef10.zip |
UTIL: Allow dup-ing child pipe to a different FD
Related to:
https://fedorahosted.org/sssd/ticket/2544
Adds a new function exec_child_ex and moves setting the extra_argv[]
to exec_child_ex() along with specifying the input and output fds.
Reviewed-by: Sumit Bose <sbose@redhat.com>
(cherry picked from commit 16cb0969f0a9ea71524d852077d6a480740d4f12)
Diffstat (limited to 'src/providers/krb5')
-rw-r--r-- | src/providers/krb5/krb5_child_handler.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/providers/krb5/krb5_child_handler.c b/src/providers/krb5/krb5_child_handler.c index 1454d220f..633cd9177 100644 --- a/src/providers/krb5/krb5_child_handler.c +++ b/src/providers/krb5/krb5_child_handler.c @@ -305,10 +305,10 @@ static errno_t fork_child(struct tevent_req *req) pid = fork(); if (pid == 0) { /* child */ - err = exec_child(state, - pipefd_to_child, pipefd_from_child, - KRB5_CHILD, state->kr->krb5_ctx->child_debug_fd, - k5c_extra_args); + err = exec_child_ex(state, + pipefd_to_child, pipefd_from_child, + KRB5_CHILD, state->kr->krb5_ctx->child_debug_fd, + k5c_extra_args, STDIN_FILENO, STDOUT_FILENO); if (err != EOK) { DEBUG(SSSDBG_CRIT_FAILURE, "Could not exec KRB5 child: [%d][%s].\n", err, strerror(err)); |