projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b59f0ec
)
logind: fix crash when shutdown is not issued from a tty
author
Martin Pitt
<martin.pitt@ubuntu.com>
Wed, 23 Mar 2016 07:46:58 +0000
(08:46 +0100)
committer
Martin Pitt
<martin.pitt@ubuntu.com>
Thu, 24 Mar 2016 07:35:17 +0000
(08:35 +0100)
It's possible that sd_bus_creds_get_tty() fails and thus
scheduled_shutdown_tty is NULL in method_schedule_shutdown().
Fix logind_wall_tty_filter() to get along with that, by showing the message on
all TTYs, instead of crashing in strcmp().
https://launchpad.net/bugs/1553040
src/login/logind-utmp.c
patch
|
blob
|
history
diff --git
a/src/login/logind-utmp.c
b/src/login/logind-utmp.c
index
11a91c3
..
29ab00e
100644
(file)
--- 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);