polkit,time: protect GetNetworkTime() with a new 'Time' policy rule

This commit is contained in:
Aleksander Morgado
2019-09-25 12:37:08 +02:00
parent be2500b02a
commit 7a7b3aa5cb
4 changed files with 63 additions and 28 deletions

View File

@@ -299,6 +299,13 @@
send_interface="org.freedesktop.ModemManager1.Modem.Signal"
send_member="Setup"/>
<!-- org.freedesktop.ModemManager1.Modem.Time.xml -->
<!-- Protected by the Time policy rule -->
<allow send_destination="org.freedesktop.ModemManager1"
send_interface="org.freedesktop.ModemManager1.Modem.Time"
send_member="GetNetworkTime"/>
</policy>
<policy user="root">

View File

@@ -54,6 +54,15 @@
</defaults>
</action>
<action id="org.freedesktop.ModemManager1.Time">
<description>Query network time and timezone information</description>
<message>System policy prevents querying network time information.</message>
<defaults>
<allow_inactive>no</allow_inactive>
<allow_active>@MM_DEFAULT_USER_POLICY@</allow_active>
</defaults>
</action>
<action id="org.freedesktop.ModemManager1.Location">
<description>Enable and view geographic location and positioning information</description>
<message>System policy prevents enabling or viewing geographic location information.</message>