systemctl: other wayland sessions should inhibit shutdown, like x11 sessions do (#7353)

Update systemctl code to match the manpage for sd_session_get_type().

"wayland" sessions should be treated the same as "x11".  "mir" too, fwiw.
This commit is contained in:
Alan Jenkins
2017-11-16 11:02:34 +01:00
committed by Lennart Poettering
parent 8006aa32ee
commit 28abce5d25
+1 -1
View File
@@ -3417,7 +3417,7 @@ static int logind_check_inhibitors(enum action a) {
if (sd_session_get_class(*s, &class) < 0 || !streq(class, "user"))
continue;
if (sd_session_get_type(*s, &type) < 0 || !STR_IN_SET(type, "x11", "tty"))
if (sd_session_get_type(*s, &type) < 0 || !STR_IN_SET(type, "x11", "wayland", "tty", "mir"))
continue;
sd_session_get_tty(*s, &tty);