service: refuse to start services that are configured for per-connection instantiation to start without a socket
This commit is contained in:
parent
276c3e78ce
commit
cac6f7c872
4
fixme
4
fixme
|
@ -65,6 +65,10 @@
|
||||||
|
|
||||||
* debian deadlock when partition auf noauto is.
|
* debian deadlock when partition auf noauto is.
|
||||||
|
|
||||||
|
* maintenance units müssen vergessen werden
|
||||||
|
|
||||||
|
* maintenance muss dokumentiert werden
|
||||||
|
|
||||||
External:
|
External:
|
||||||
|
|
||||||
* patch /etc/init.d/functions with:
|
* patch /etc/init.d/functions with:
|
||||||
|
|
|
@ -1896,6 +1896,14 @@ static int service_start(Unit *u) {
|
||||||
return -ECANCELED;
|
return -ECANCELED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((s->exec_context.std_input == EXEC_INPUT_SOCKET ||
|
||||||
|
s->exec_context.std_output == EXEC_OUTPUT_SOCKET ||
|
||||||
|
s->exec_context.std_error == EXEC_OUTPUT_SOCKET) &&
|
||||||
|
s->socket_fd < 0) {
|
||||||
|
log_warning("%s can only be started with a per-connection socket.", u->meta.id);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
s->failure = false;
|
s->failure = false;
|
||||||
s->main_pid_known = false;
|
s->main_pid_known = false;
|
||||||
s->allow_restart = true;
|
s->allow_restart = true;
|
||||||
|
|
Loading…
Reference in New Issue