summaryrefslogtreecommitdiff
path: root/src/login/logind-utmp.c
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 /src/login/logind-utmp.c
parentd8fd85e94f3c2c850f53175d2c277ffb671a7b2b (diff)
parentb4944d2df248fbd2f96a4b9b4fe02fe0c1af7499 (diff)
Merge pull request #2887 from martinpitt/master
Fix logind crash if shutdown is called from a non-tty
Diffstat (limited to 'src/login/logind-utmp.c')
-rw-r--r--src/login/logind-utmp.c2
1 files changed, 1 insertions, 1 deletions
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);