From f5862c9862e1f4f1c2cacb73fffc283e068e3835 Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Mon, 4 Dec 2023 21:28:10 +0000 Subject: [PATCH] feat(dbus): update common dbus abs. --- apparmor.d/abstractions/bus/login | 17 ++++++++++++++++- apparmor.d/abstractions/bus/udisk | 9 +++++++++ apparmor.d/abstractions/bus/upower | 2 +- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/apparmor.d/abstractions/bus/login b/apparmor.d/abstractions/bus/login index 96f6116a..c3d7a0a1 100644 --- a/apparmor.d/abstractions/bus/login +++ b/apparmor.d/abstractions/bus/login @@ -2,9 +2,24 @@ # Copyright (C) 2023 Alexandre Pujol # SPDX-License-Identifier: GPL-2.0-only + dbus send bus=system path=/org/freedesktop/login1 + interface=org.freedesktop.DBus.Properties + member={Get,GetAll} + peer=(name="{:*,org.freedesktop.login1}", label=systemd-logind), + + dbus receive bus=system path=/org/freedesktop/login1 + interface=org.freedesktop.DBus.Properties + member=PropertiesChanged + peer=(name=:*, label=systemd-logind), + dbus send bus=system path=/org/freedesktop/login1 interface=org.freedesktop.login1.Manager member=Inhibit - peer=(name=org.freedesktop.login1, label=systemd-logind), + peer=(name="{:*,org.freedesktop.login1}", label=systemd-logind), + + dbus receive bus=system path=/org/freedesktop/login1 + interface=org.freedesktop.login1.Manager + member={SessionNew,SessionRemoved,UserNew,UserRemoved,PrepareFor*} + peer=(name=:*, label=systemd-logind), include if exists diff --git a/apparmor.d/abstractions/bus/udisk b/apparmor.d/abstractions/bus/udisk index e2ffe326..58eef524 100644 --- a/apparmor.d/abstractions/bus/udisk +++ b/apparmor.d/abstractions/bus/udisk @@ -7,5 +7,14 @@ member=GetManagedObjects peer=(name=:*, label=udisksd), + dbus receive bus=system path=/org/freedesktop/UDisks2 + interface=org.freedesktop.DBus.ObjectManager + member=InterfacesAdded + peer=(name=:*, label=udisksd), + + dbus receive bus=system path=/org/freedesktop/UDisks2/jobs/@{int} + interface=org.freedesktop.UDisks2.Job + member=Completed + peer=(name=:*, label=udisksd), include if exists diff --git a/apparmor.d/abstractions/bus/upower b/apparmor.d/abstractions/bus/upower index 43a79d21..e9cc747a 100644 --- a/apparmor.d/abstractions/bus/upower +++ b/apparmor.d/abstractions/bus/upower @@ -5,7 +5,7 @@ dbus send bus=system path=/org/freedesktop/UPower interface=org.freedesktop.UPower member=EnumerateDevices - peer=(name=org.freedesktop.UPower, label=upowerd), + peer=(name="{:*,org.freedesktop.UPower}", label=upowerd), dbus send bus=system path=/org/freedesktop/UPower interface=org.freedesktop.DBus.Properties