summaryrefslogtreecommitdiff
path: root/src/machine/org.freedesktop.machine1.policy.in
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-08-24 21:27:37 +0200
committerLennart Poettering <lennart@poettering.net>2015-08-24 22:46:45 +0200
commit4289c3a725062e2750da0baaf67fc53ba90e4739 (patch)
tree8117b60373f01ac8883eb6b74c0f94ec3f9db177 /src/machine/org.freedesktop.machine1.policy.in
parentb04c25f9ef6359ed0ae403bdbfe4df840aba0f58 (diff)
downloadsystemd-4289c3a725062e2750da0baaf67fc53ba90e4739.tar.gz
machined: beef up PolicyKit actions
Introduce separate actions for creating login or shell sessions for the local host or a local container. By default allow local unprivileged clients to create new login sessions (which is safe, since getty will ask for username and authentication). Also, imply login privs from shell privs, as well as shell and login privs from manage privs.
Diffstat (limited to 'src/machine/org.freedesktop.machine1.policy.in')
-rw-r--r--src/machine/org.freedesktop.machine1.policy.in39
1 files changed, 36 insertions, 3 deletions
diff --git a/src/machine/org.freedesktop.machine1.policy.in b/src/machine/org.freedesktop.machine1.policy.in
index f1557806d1..6e35c5c045 100644
--- a/src/machine/org.freedesktop.machine1.policy.in
+++ b/src/machine/org.freedesktop.machine1.policy.in
@@ -26,6 +26,38 @@
</defaults>
</action>
+ <action id="org.freedesktop.machine1.host-login">
+ <_description>Log into the local host</_description>
+ <_message>Authentication is required to log into the local host.</_message>
+ <defaults>
+ <allow_any>auth_admin</allow_any>
+ <allow_inactive>auth_admin</allow_inactive>
+ <allow_active>yes</allow_active>
+ </defaults>
+ </action>
+
+ <action id="org.freedesktop.machine1.shell">
+ <_description>Acquire a shell in a local container</_description>
+ <_message>Authentication is required to acquire a shell in a local container.</_message>
+ <defaults>
+ <allow_any>auth_admin</allow_any>
+ <allow_inactive>auth_admin</allow_inactive>
+ <allow_active>auth_admin_keep</allow_active>
+ </defaults>
+ <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.login</annotate>
+ </action>
+
+ <action id="org.freedesktop.machine1.host-shell">
+ <_description>Acquire a shell on the local host</_description>
+ <_message>Authentication is required to acquire a shell on the local host.</_message>
+ <defaults>
+ <allow_any>auth_admin</allow_any>
+ <allow_inactive>auth_admin</allow_inactive>
+ <allow_active>auth_admin_keep</allow_active>
+ </defaults>
+ <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.host-login</annotate>
+ </action>
+
<action id="org.freedesktop.machine1.open-pty">
<_description>Acquire a pseudo TTY in a local container</_description>
<_message>Authentication is acquire a pseudo TTY in a local container.</_message>
@@ -36,9 +68,9 @@
</defaults>
</action>
- <action id="org.freedesktop.machine1.shell">
- <_description>Acquire a shell in a local container</_description>
- <_message>Authentication is required to acquire a shell in a local container.</_message>
+ <action id="org.freedesktop.machine1.host-open-pty">
+ <_description>Acquire a pseudo TTY on the local host</_description>
+ <_message>Authentication is acquire a pseudo TTY on the local host.</_message>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
@@ -54,6 +86,7 @@
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
+ <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.shell org.freedesktop.login1.login</annotate>
</action>
<action id="org.freedesktop.machine1.manage-images">