From 28abce5d25111571e89e3b1feb25033131d2ebfb Mon Sep 17 00:00:00 2001 From: Alan Jenkins Date: Thu, 16 Nov 2017 10:02:34 +0000 Subject: [PATCH] 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. --- src/systemctl/systemctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index f8c8c31..9d9b45f 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -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); -- 2.7.4