feat(profile): rewrite the dbus profiles.
Replace the old dbus-broker/dbus-daemon profiles stack by a new unified set of profiles that does not depend-on the dbus implementation used. Ensure that a given bus is fully managed by one unified profile: - We need to allow far fewer rules than before (especially by splitting dbus-system and dbus-session). - It has the side effect to fix some long-running issues regarding dbus start (see: #74, #80 & #235) while keeping all dbus server in the same place.
This commit is contained in:
parent
4819022202
commit
61e2cb55ac
10 changed files with 199 additions and 360 deletions
|
|
@ -1,65 +0,0 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2018-2022 Mikhail Morfikov
|
||||
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/3.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = @{lib}/{,at-spi2{,-core}/}at-spi-bus-launcher
|
||||
profile at-spi-bus @{exec_path} flags=(attach_disconnected) {
|
||||
include <abstractions/base>
|
||||
include <abstractions/bus-accessibility>
|
||||
include <abstractions/bus-session>
|
||||
include <abstractions/dconf-write>
|
||||
include <abstractions/nameservice-strict>
|
||||
|
||||
network inet stream, # TODO: local only
|
||||
network inet6 stream,
|
||||
network inet dgram,
|
||||
network inet6 dgram,
|
||||
network netlink raw,
|
||||
|
||||
signal (receive) set=(term hup kill) peer=dbus-daemon,
|
||||
|
||||
dbus bus=accessibility,
|
||||
dbus bus=session,
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
@{bin}/dbus-broker-launch rix,
|
||||
@{bin}/dbus-daemon rix,
|
||||
@{bin}/dbus-broker rix,
|
||||
@{lib}/{,at-spi2{,-core}/}at-spi2-registryd rix,
|
||||
|
||||
/usr/share/dbus-1/accessibility-services/ r,
|
||||
/usr/share/dbus-1/accessibility-services/org.a11y.atspi.Registry.service r,
|
||||
/usr/share/dconf/profile/gdm r,
|
||||
/usr/share/defaults/at-spi2/accessibility.conf r,
|
||||
/usr/share/gdm/greeter-dconf-defaults r,
|
||||
/usr/share/glib-2.0/schemas/gschemas.compiled r,
|
||||
|
||||
/var/lib/gdm{3,}/.config/dconf/user r,
|
||||
/var/lib/gdm{3,}/greeter-dconf-defaults r,
|
||||
/var/lib/lightdm/.Xauthority r,
|
||||
/var/log/lightdm/seat@{int}-greeter.log w,
|
||||
|
||||
@{run}/systemd/users/@{uid} r,
|
||||
|
||||
@{sys}/kernel/security/apparmor/.access rw,
|
||||
@{sys}/kernel/security/apparmor/features/dbus/mask r,
|
||||
@{sys}/module/apparmor/parameters/enabled r,
|
||||
|
||||
@{PROC}/@{pid}/cmdline r,
|
||||
@{PROC}/@{pid}/oom_score_adj rw,
|
||||
@{PROC}/@{pids}/mounts r,
|
||||
@{PROC}/1/cgroup r,
|
||||
owner @{PROC}/@{pid}/attr/apparmor/current r,
|
||||
owner @{PROC}/@{pid}/cgroup r,
|
||||
owner @{PROC}/@{pid}/fd/ r,
|
||||
|
||||
owner /dev/tty@{int} rw,
|
||||
|
||||
include if exists <local/at-spi-bus>
|
||||
}
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2018-2021 Mikhail Morfikov
|
||||
# Copyright (C) 2022-2024 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/3.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = @{lib}/{,at-spi2{,-core}/}at-spi2-registryd
|
||||
profile at-spi2-registryd @{exec_path} flags=(attach_disconnected) {
|
||||
include <abstractions/base>
|
||||
include <abstractions/bus-accessibility>
|
||||
include <abstractions/bus-session>
|
||||
include <abstractions/bus/org.a11y>
|
||||
include <abstractions/bus/org.gnome.SessionManager>
|
||||
include <abstractions/nameservice-strict>
|
||||
include <abstractions/X-strict>
|
||||
|
||||
signal (receive) set=(term hup kill) peer=@{systemd},
|
||||
signal (receive) set=(term hup kill) peer=dbus-daemon,
|
||||
signal (receive) set=(term hup kill) peer=gdm*,
|
||||
|
||||
# dbus: own bus=accessibility name=org.a11y.atspi.{R,r}egistry
|
||||
|
||||
dbus send bus=accessibility path=/org/a11y/atspi/accessible/root
|
||||
interface=org.freedesktop.DBus.Properties
|
||||
member=Set
|
||||
peer=(name=:*),
|
||||
dbus receive bus=accessibility path=/org/a11y/atspi/accessible/root
|
||||
interface=org.a11y.atspi.Socket
|
||||
member=Embed
|
||||
peer=(name=:*),
|
||||
|
||||
dbus receive bus=accessibility path=/org/a11y/atspi/registry/deviceeventcontroller
|
||||
interface=org.a11y.atspi.DeviceEventController
|
||||
member={GetKeystrokeListeners,GetDeviceEventListeners}
|
||||
peer=(name=:*),
|
||||
|
||||
dbus receive bus=session
|
||||
interface=org.freedesktop.DBus.Introspectable
|
||||
member=Introspect
|
||||
peer=(name=:*, label=gnome-shell),
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
owner /dev/tty@{int} rw,
|
||||
|
||||
include if exists <local/at-spi2-registryd>
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue