From c5da34ef1ba450351638be0d71bddb54677a4d6e Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 2 Jul 2010 23:25:25 +0200 Subject: [PATCH] execute: check tcpwrap for sockets passed via new-style socket passing as well. --- src/execute.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/execute.c b/src/execute.c index cf71f232b..9ded1c778 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; -- 2.30.2