diff --git a/cmd/adsysd/integration_tests/adsys_test.go b/cmd/adsysd/integration_tests/adsys_test.go index 42d8d0dea..257c41f42 100644 --- a/cmd/adsysd/integration_tests/adsys_test.go +++ b/cmd/adsysd/integration_tests/adsys_test.go @@ -412,7 +412,10 @@ func runDaemons() (teardown func()) { go func() { defer wg.Done() - if err := os.MkdirAll(socketDir, 0750); err != nil { + // 24.04 introduced some polkit changes that make the daemon drop root privileges before executing. In order + // to be able to connect to the bus and run polkitd, we need more permissions in the socket directory. + //nolint:gosec + if err := os.MkdirAll(socketDir, 0755); err != nil { log.Fatalf("Setup: can’t create %s socket directory: %v", answer, err) } diff --git a/cmd/adsysd/integration_tests/systemdaemons/Dockerfile b/cmd/adsysd/integration_tests/systemdaemons/Dockerfile index b73cda084..3a55089af 100644 --- a/cmd/adsysd/integration_tests/systemdaemons/Dockerfile +++ b/cmd/adsysd/integration_tests/systemdaemons/Dockerfile @@ -3,10 +3,7 @@ FROM ubuntu ENV DEBIAN_FRONTEND=noninteractive # we need at least dbusmock 0.25 to use systemd template -RUN \ - apt-get update && \ - apt-get install -y policykit-1 dbus libglib2.0-bin python3-pip python3-gi python3-dbus && \ - pip install python-dbusmock +RUN apt update && apt install -y polkitd dbus libglib2.0-bin python3-gi python3-dbus python3-dbusmock COPY cmd/adsysd/integration_tests/systemdaemons/*.py / COPY cmd/adsysd/integration_tests/systemdaemons/run_daemons / diff --git a/cmd/adsysd/integration_tests/systemdaemons/run_daemons b/cmd/adsysd/integration_tests/systemdaemons/run_daemons index fa5b5b2be..d68670837 100755 --- a/cmd/adsysd/integration_tests/systemdaemons/run_daemons +++ b/cmd/adsysd/integration_tests/systemdaemons/run_daemons @@ -14,7 +14,7 @@ from gi.repository import GLib from session_daemons import start_session_bus, run_session_mocks from system_daemons import start_system_bus, run_system_mocks -POLKIT_PATH = "/usr/libexec/polkitd" +POLKIT_PATH = "/usr/lib/polkit-1/polkitd" ADSYS_POLICY_PATH_SRC = "/usr/share/polkit-1/actions.orig/com.ubuntu.adsys.policy" ADSYS_POLICY_PATH_DST = "/usr/share/polkit-1/actions/com.ubuntu.adsys.policy" diff --git a/debian/control b/debian/control index c4cfc948b..dc3658eb6 100644 --- a/debian/control +++ b/debian/control @@ -47,6 +47,7 @@ Recommends: ${misc:Recommends}, Suggests: curlftpfs, ubuntu-proxy-manager, python3-cepces, + polkitd-pkla, Description: ${source:Synopsis} ${source:Extended-Description}