diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-16 18:24:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-16 18:24:53 +0000 |
commit | 00848b21aeed8a9f7b1265b4519f96ecb11249b5 (patch) | |
tree | f21649e74e15d13d98d1771a33da04d0a69bf2c9 /debian/tests | |
parent | Releasing progress-linux version 256.4-1~progress7.99u1. (diff) | |
download | systemd-00848b21aeed8a9f7b1265b4519f96ecb11249b5.tar.xz systemd-00848b21aeed8a9f7b1265b4519f96ecb11249b5.zip |
Merging debian version 256.4-2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/tests')
-rwxr-xr-x | debian/tests/localed-locale | 18 | ||||
-rwxr-xr-x | debian/tests/localed-x11-keymap | 18 |
2 files changed, 36 insertions, 0 deletions
diff --git a/debian/tests/localed-locale b/debian/tests/localed-locale index d666be2..85477b0 100755 --- a/debian/tests/localed-locale +++ b/debian/tests/localed-locale @@ -3,6 +3,24 @@ set -e . `dirname $0`/assert.sh +# Calls to localed are blocked as other tools are used to change settings, +# override that policy +mkdir -p /etc/dbus-1/system.d/ +cat >/etc/dbus-1/system.d/systemd-localed-read-only.conf <<EOF +<?xml version="1.0"?> +<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" + "https://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> +<busconfig> + <policy user="root"> + <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 +trap 'rm -f /etc/dbus-1/system.d/systemd-localed-read-only.conf' EXIT +systemctl reload dbus.service || true + if [ -f /etc/locale.conf ]; then cp /etc/locale.conf /etc/locale.conf.orig fi diff --git a/debian/tests/localed-x11-keymap b/debian/tests/localed-x11-keymap index 1fd29d3..b4f8af8 100755 --- a/debian/tests/localed-x11-keymap +++ b/debian/tests/localed-x11-keymap @@ -24,9 +24,27 @@ cleanup() { rm -f /etc/default/keyboard fi rm -f /etc/X11/xorg.conf.d/00-keyboard.conf + rm -f /etc/dbus-1/system.d/systemd-localed-read-only.conf } trap cleanup EXIT INT QUIT PIPE +# Calls to localed are blocked as other tools are used to change settings, +# override that policy +mkdir -p /etc/dbus-1/system.d/ +cat >/etc/dbus-1/system.d/systemd-localed-read-only.conf <<EOF +<?xml version="1.0"?> +<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" + "https://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> +<busconfig> + <policy user="root"> + <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 +systemctl reload dbus.service || true + # should activate daemon and work STATUS=`localectl` assert_in "X11 Layout:" "`localectl --no-pager`" |