diff options
author | Jan Synacek <jsynacek@redhat.com> | 2015-08-24 14:54:22 +0200 |
---|---|---|
committer | Jan Synacek <jsynacek@redhat.com> | 2015-08-25 13:52:44 +0200 |
commit | 9ef15026c0e7e6600372056c43442c99ec53746e (patch) | |
tree | 7b82f423cb3499c100c1d2a2b5540d336d4928f9 /src/login/org.freedesktop.login1.policy.in | |
parent | 72aa2c2a2083362afda9f09805563848d54e31df (diff) |
logind/systemctl: introduce SetWallMessage and --message
Enable unprivileged users to set wall message on a shutdown
operation. When the message is set via the --message option,
it is logged together with the default shutdown message.
$ systemctl reboot --message "Applied kernel updates."
$ journalctl -b -1
...
systemd-logind[27]: System is rebooting. (Applied kernel updates.)
...
Diffstat (limited to 'src/login/org.freedesktop.login1.policy.in')
-rw-r--r-- | src/login/org.freedesktop.login1.policy.in | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/login/org.freedesktop.login1.policy.in b/src/login/org.freedesktop.login1.policy.in index 83e7183323..23326bb79f 100644 --- a/src/login/org.freedesktop.login1.policy.in +++ b/src/login/org.freedesktop.login1.policy.in @@ -150,6 +150,7 @@ <allow_inactive>auth_admin_keep</allow_inactive> <allow_active>yes</allow_active> </defaults> + <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.set-wall-message</annotate> </action> <action id="org.freedesktop.login1.power-off-multiple-sessions"> @@ -182,6 +183,7 @@ <allow_inactive>auth_admin_keep</allow_inactive> <allow_active>yes</allow_active> </defaults> + <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.set-wall-message</annotate> </action> <action id="org.freedesktop.login1.reboot-multiple-sessions"> @@ -300,4 +302,14 @@ </defaults> </action> + <action id="org.freedesktop.login1.set-wall-message"> + <_description>Set a wall message</_description> + <_message>Authentication is required to set a wall message</_message> + <defaults> + <allow_any>auth_admin_keep</allow_any> + <allow_inactive>auth_admin_keep</allow_inactive> + <allow_active>auth_admin_keep</allow_active> + </defaults> + </action> + </policyconfig> |