]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: fix D-Bus policy override for TEST-73-LOCALE
authorLuca Boccassi <bluca@debian.org>
Thu, 25 Jul 2024 09:43:48 +0000 (10:43 +0100)
committerLuca Boccassi <bluca@debian.org>
Thu, 25 Jul 2024 09:43:48 +0000 (10:43 +0100)
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 7b5c38a91def6cf236605010a0a93a1cd4c137e9

test/units/TEST-73-LOCALE.sh

index 06c8c56745ddcfc5a15a0707e7ad03cdb0ac7d68..0617bd0d51a1db8f851c7b279b5262e716220deb 100755 (executable)
@@ -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