test: fix D-Bus policy override for TEST-73-LOCALE

We don't need to allow non-root, and the policy needs to specify destination
and interface too, to narrow it down

Follow-up for 7b5c38a91d
This commit is contained in:
Luca Boccassi
2024-07-25 10:43:48 +01:00
parent 11d5e2b5fb
commit a4c436c9d8
+3 -8
View File
@@ -666,14 +666,9 @@ cat >/etc/dbus-1/system.d/systemd-localed-read-only.conf <<EOF
"https://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<policy user="root">
<allow send_member="SetLocale"/>
<allow send_member="SetVConsoleKeyboard"/>
<allow send_member="SetX11Keyboard"/>
</policy>
<policy context="default">
<allow send_member="SetLocale"/>
<allow send_member="SetVConsoleKeyboard"/>
<allow send_member="SetX11Keyboard"/>
<allow send_destination="org.freedesktop.locale1" send_interface="org.freedesktop.locale1" send_member="SetLocale"/>
<allow send_destination="org.freedesktop.locale1" send_interface="org.freedesktop.locale1" send_member="SetVConsoleKeyboard"/>
<allow send_destination="org.freedesktop.locale1" send_interface="org.freedesktop.locale1" send_member="SetX11Keyboard"/>
</policy>
</busconfig>
EOF