]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: never check inhibitors if -H or -M are used (#3781)
authorLennart Poettering <lennart@poettering.net>
Fri, 22 Jul 2016 15:39:21 +0000 (17:39 +0200)
committerGitHub <noreply@github.com>
Fri, 22 Jul 2016 15:39:21 +0000 (17:39 +0200)
Don't check inhibitors when operating remotely. The interactivity inhibitors
imply can#t be provided anyway, and the current code checks for local sessions
directly, via various sd_session_xyz() APIs, hence bypass it entirely if we
operate on remote systems.

Fixes: #3476
src/systemctl/systemctl.c

index d3f437411a9bbc5f4c4d78f2b307863cf19141db..1dbe35997a773432fbc1417753467eeaf4823877 100644 (file)
@@ -3033,6 +3033,9 @@ static int logind_check_inhibitors(enum action a) {
         if (!on_tty())
                 return 0;
 
+        if (arg_transport != BUS_TRANSPORT_LOCAL)
+                return 0;
+
         r = acquire_bus(BUS_FULL, &bus);
         if (r < 0)
                 return r;