diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-07-02 23:25:25 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-07-02 23:25:25 +0200 |
commit | c5da34ef1ba450351638be0d71bddb54677a4d6e (patch) | |
tree | a5d30c1b3e0151920f8f13251c10296370599af1 | |
parent | dd1eb43ba771d4d56b20b4c93ba3acc59475f642 (diff) |
execute: check tcpwrap for sockets passed via new-style socket passing as well.
-rw-r--r-- | src/execute.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/execute.c b/src/execute.c index cf71f232b4..9ded1c7788 100644 --- a/src/execute.c +++ b/src/execute.c @@ -970,11 +970,20 @@ int exec_spawn(ExecCommand *command, goto fail; } - if (socket_fd >= 0 && context->tcpwrap_name) - if (!socket_tcpwrap(socket_fd, context->tcpwrap_name)) { - r = EXIT_TCPWRAP; - goto fail; + if (context->tcpwrap_name) { + if (socket_fd >= 0) + if (!socket_tcpwrap(socket_fd, context->tcpwrap_name)) { + r = EXIT_TCPWRAP; + goto fail; + } + + for (i = 0; i < (int) n_fds; i++) { + if (!socket_tcpwrap(fds[i], context->tcpwrap_name)) { + r = EXIT_TCPWRAP; + goto fail; + } } + } if (confirm_spawn) { char response; |