socket: don't crash if the .service unit for a .socket unit is not found
This commit is contained in:
parent
036315352d
commit
cae18e2172
2
TODO
2
TODO
|
@ -8,6 +8,8 @@ Bugs:
|
||||||
|
|
||||||
* isolate multi-user.target doesn't start a getty@tty1 if we run it from graphical.target
|
* isolate multi-user.target doesn't start a getty@tty1 if we run it from graphical.target
|
||||||
|
|
||||||
|
* when plymouth is disabled the console password entry stuff seems to be borked
|
||||||
|
|
||||||
Features:
|
Features:
|
||||||
|
|
||||||
* maybe introduce ExecRestartPre=
|
* maybe introduce ExecRestartPre=
|
||||||
|
|
|
@ -760,8 +760,9 @@ static int socket_open_fds(Socket *s) {
|
||||||
if ((r = socket_instantiate_service(s)) < 0)
|
if ((r = socket_instantiate_service(s)) < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
if ((r = label_get_socket_label_from_exe(s->service->exec_command[SERVICE_EXEC_START]->path, &label)) < 0)
|
if (s->service && s->service->exec_command[SERVICE_EXEC_START])
|
||||||
return r;
|
if ((r = label_get_socket_label_from_exe(s->service->exec_command[SERVICE_EXEC_START]->path, &label)) < 0)
|
||||||
|
return r;
|
||||||
|
|
||||||
know_label = true;
|
know_label = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue