mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
core/service: don't give ExecStopPost= commands tty access
All tasks spawned later than ExecStart= (e.g. ExecReload=, ExecStop=, ...) don't get tty access. ExecStopPost= is the odd one out. Fix that.
This commit is contained in:
@@ -1604,7 +1604,7 @@ static ExecFlags service_exec_flags(ServiceExecCommand command_id) {
|
||||
assert(command_id < _SERVICE_EXEC_COMMAND_MAX);
|
||||
|
||||
/* Control processes spawned before main process also get tty access */
|
||||
if (IN_SET(command_id, SERVICE_EXEC_CONDITION, SERVICE_EXEC_START_PRE, SERVICE_EXEC_START, /* FIXME */ SERVICE_EXEC_STOP_POST))
|
||||
if (IN_SET(command_id, SERVICE_EXEC_CONDITION, SERVICE_EXEC_START_PRE, SERVICE_EXEC_START))
|
||||
flags |= EXEC_APPLY_TTY_STDIN;
|
||||
|
||||
/* All start phases get access to credentials */
|
||||
|
||||
Reference in New Issue
Block a user