apparmor.d/apparmor.d/profiles-a-f/bluetoothd
2023-09-12 22:55:24 +01:00

63 lines
1.6 KiB
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2015-2022 Mikhail Morfikov
# Copyright (C) 2021-2022 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{lib}/bluetooth/bluetoothd
profile bluetoothd @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
include <abstractions/dbus-strict>
# Needed for configuring HCI interfaces
capability net_admin,
capability net_bind_service,
network bluetooth raw,
network bluetooth seqpacket,
network bluetooth stream,
network alg seqpacket,
network netlink raw,
dbus send bus=system path=/org/freedesktop/DBus
interface=org.freedesktop.DBus
peer=(name=org.freedesktop.DBus, label=dbus-daemon),
dbus send bus=system path=/org/bluez/hci0
interface=org.freedesktop.DBus.Properties
member=PropertiesChanged
peer=(name=org.freedesktop.DBus),
dbus receive bus=system path=/org/bluez{,**}
interface=org.bluez.Media1
member=RegisterApplication
peer=(name=:*),
@{exec_path} mr,
@{lib}/@{multiarch}/bluetooth/plugins/*.so mr,
/etc/bluetooth/{,*.conf} r,
/var/lib/bluetooth/{,**} rw,
@{run}/sdp rw,
@{run}/udev/data/+hid:* r, # for HID-Compliant Keyboard
@{sys}/devices/pci[0-9]*/**/rfkill[0-9]*/name r,
@{sys}/devices/pci[0-9]*/**/bluetooth/**/{uevent,name} r,
@{sys}/devices/platform/**/rfkill/**/name r,
@{sys}/devices/virtual/dmi/id/chassis_type r,
@{PROC}/sys/kernel/hostname r,
/dev/uhid rw,
/dev/uinput rw,
/dev/rfkill rw,
/dev/hidraw@{int} rw,
include if exists <local/bluetoothd>
}