chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
dd1eb43
)
execute: check tcpwrap for sockets passed via new-style socket passing as well.
author
Lennart Poettering
<lennart@poettering.net>
Fri, 2 Jul 2010 21:25:25 +0000
(23:25 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Fri, 2 Jul 2010 21:25:25 +0000
(23:25 +0200)
src/execute.c
patch
|
blob
|
history
diff --git
a/src/execute.c
b/src/execute.c
index cf71f232b421635c7705d019c2b3b788bef47f70..9ded1c77882cd3e5750f3f8cb348eedeb6ffbc3b 100644
(file)
--- a/
src/execute.c
+++ b/
src/execute.c
@@
-970,11
+970,20
@@
int exec_spawn(ExecCommand *command,
goto fail;
}
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;
if (confirm_spawn) {
char response;