Merge pull request #2887 from martinpitt/master
Fix logind crash if shutdown is called from a non-tty
This commit is contained in:
+1
-1
@@ -645,7 +645,7 @@ _pure_ static const char *job_get_status_message_format(Unit *u, JobType t, JobR
|
||||
static const char *const generic_finished_stop_job[_JOB_RESULT_MAX] = {
|
||||
[JOB_DONE] = "Stopped %s.",
|
||||
[JOB_FAILED] = "Stopped (with error) %s.",
|
||||
[JOB_TIMEOUT] = "Timed out stoppping %s.",
|
||||
[JOB_TIMEOUT] = "Timed out stopping %s.",
|
||||
};
|
||||
static const char *const generic_finished_reload_job[_JOB_RESULT_MAX] = {
|
||||
[JOB_DONE] = "Reloaded %s.",
|
||||
|
||||
@@ -65,7 +65,7 @@ bool logind_wall_tty_filter(const char *tty, void *userdata) {
|
||||
|
||||
assert(m);
|
||||
|
||||
if (!startswith(tty, "/dev/"))
|
||||
if (!startswith(tty, "/dev/") || !m->scheduled_shutdown_tty)
|
||||
return true;
|
||||
|
||||
return !streq(tty + 5, m->scheduled_shutdown_tty);
|
||||
|
||||
Reference in New Issue
Block a user