summaryrefslogtreecommitdiff
path: root/src/login/org.freedesktop.login1.conf
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-10-02 16:03:55 +0200
committerSven Eden <yamakuzure@gmx.net>2017-12-08 07:30:24 +0100
commitdfa9a97253a144ff90e64d271e6d02dec6a2ebad (patch)
tree9e1695845519d0f01c2a16ec78a4a16f17ab8111 /src/login/org.freedesktop.login1.conf
parent7cd8f97c73ef8e5d6f6734683b4e597307a2cb7c (diff)
logind: add Halt() and CanHalt() APIs
This adds new method calls Halt() and CanHalt() to the logind bus APIs. They aren't overly useful (as the whole concept of halting isn't really too useful), however they clean up one major asymmetry: currently, using the "shutdown" legacy commands it is possibly to enqueue a "halt" operation through logind, while logind officially doesn't actually support this. Moreover, the path through "shutdown" currently ultimately fails, since the referenced "halt" action isn't actually defined in PolicyKit. Finally, the current logic results in an unexpected asymmetry in systemctl: "systemctl poweroff", "systemctl reboot" are currently asynchronous (due to the logind involvement) while "systemctl halt" isnt. Let's clean this up, and make all three APIs implemented by logind natively, and all three hence asynchronous in "systemctl". Moreover, let's add the missing PK action. Fixes: #6957
Diffstat (limited to 'src/login/org.freedesktop.login1.conf')
-rw-r--r--src/login/org.freedesktop.login1.conf8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/login/org.freedesktop.login1.conf b/src/login/org.freedesktop.login1.conf
index b11ab764c..f1d8cce53 100644
--- a/src/login/org.freedesktop.login1.conf
+++ b/src/login/org.freedesktop.login1.conf
@@ -134,6 +134,10 @@
<allow send_destination="org.freedesktop.login1"
send_interface="org.freedesktop.login1.Manager"
+ send_member="Halt"/>
+
+ <allow send_destination="org.freedesktop.login1"
+ send_interface="org.freedesktop.login1.Manager"
send_member="Suspend"/>
<allow send_destination="org.freedesktop.login1"
@@ -154,6 +158,10 @@
<allow send_destination="org.freedesktop.login1"
send_interface="org.freedesktop.login1.Manager"
+ send_member="CanHalt"/>
+
+ <allow send_destination="org.freedesktop.login1"
+ send_interface="org.freedesktop.login1.Manager"
send_member="CanSuspend"/>
<allow send_destination="org.freedesktop.login1"