Merge pull request #2887 from martinpitt/master

Fix logind crash if shutdown is called from a non-tty
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2016-03-25 17:06:50 -04:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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.",
+1 -1
View File
@@ -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);