summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-03-25 17:06:50 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-03-25 17:06:50 -0400
commit09541e49ebd17b41482e447dd8194942f39788c0 (patch)
treeaba6f7c843a787f76c419f1aa3c1f5248be57c72
parentd8fd85e94f3c2c850f53175d2c277ffb671a7b2b (diff)
parentb4944d2df248fbd2f96a4b9b4fe02fe0c1af7499 (diff)
Merge pull request #2887 from martinpitt/master
Fix logind crash if shutdown is called from a non-tty
-rw-r--r--src/core/job.c2
-rw-r--r--src/login/logind-utmp.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/core/job.c b/src/core/job.c
index 719cb0a3e5..5557a6a942 100644
--- a/src/core/job.c
+++ b/src/core/job.c
@@ -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.",
diff --git a/src/login/logind-utmp.c b/src/login/logind-utmp.c
index 11a91c3947..29ab00eb1f 100644
--- a/src/login/logind-utmp.c
+++ b/src/login/logind-utmp.c
@@ -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);