2021-04-01 17:17:47 +02:00
|
|
|
# apparmor.d - Full set of apparmor profiles
|
|
|
|
# Copyright (C) 2017-2021 Mikhail Morfikov
|
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
abi <abi/3.0>,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include <tunables/global>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
@{exec_path} = /{usr/,}bin/pulseaudio
|
|
|
|
profile pulseaudio @{exec_path} {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/consoles>
|
|
|
|
include <abstractions/audio>
|
|
|
|
include <abstractions/nameservice-strict>
|
|
|
|
include <abstractions/deny-root-dir-access>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
ptrace (trace) peer=@{profile_name},
|
|
|
|
|
|
|
|
signal (receive) peer=pacmd,
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
network inet stream,
|
|
|
|
network inet6 stream,
|
|
|
|
network netlink raw,
|
|
|
|
|
2021-03-14 18:57:00 +01:00
|
|
|
network bluetooth stream,
|
|
|
|
network bluetooth seqpacket,
|
|
|
|
|
2020-09-12 17:19:23 +02:00
|
|
|
@{exec_path} mrix,
|
|
|
|
|
|
|
|
/{usr/,}lib/@{multiarch}/pulse/gconf-helper mrix,
|
|
|
|
|
|
|
|
# PulseAudio files
|
|
|
|
/usr/share/pulseaudio/** r,
|
|
|
|
/{usr/,}lib/pulse-*/modules/*.so mr,
|
|
|
|
|
|
|
|
# PulseAudio home config files
|
|
|
|
owner @{HOME}/.config/pulse/{,**} rw,
|
|
|
|
|
|
|
|
# Needed when PulseAudio is started via the start-pulseaudio-x11 script
|
|
|
|
owner @{HOME}/.Xauthority r,
|
|
|
|
|
|
|
|
# TCP wrap
|
|
|
|
/etc/hosts.{allow,deny} r,
|
|
|
|
|
2020-10-25 10:23:34 +01:00
|
|
|
owner @{run}/user/[0-9]*/ rw,
|
|
|
|
owner @{run}/user/[0-9]*/pulse/{,*} rw,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
/usr/share/applications/{,**} r,
|
|
|
|
|
|
|
|
@{sys}/bus/ r,
|
|
|
|
@{sys}/class/ r,
|
|
|
|
@{sys}/class/sound/ r,
|
|
|
|
@{sys}/devices/**/sound/**/{uevent,pcm_class} r,
|
2020-10-25 10:23:34 +01:00
|
|
|
@{run}/udev/data/+sound* r,
|
|
|
|
@{run}/udev/data/c116:[0-9]* r, # For ALSA
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
@{sys}/devices/virtual/dmi/id/{bios_vendor,board_vendor,sys_vendor} r,
|
|
|
|
@{sys}/devices/system/node/ r,
|
|
|
|
@{sys}/devices/system/node/node[0-9]/meminfo r,
|
|
|
|
|
2020-10-25 10:23:34 +01:00
|
|
|
@{run}/systemd/users/[0-9]* r,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
owner @{PROC}/@{pid}/fd/ r,
|
|
|
|
owner @{PROC}/@{pid}/stat r,
|
|
|
|
|
|
|
|
/var/lib/dbus/machine-id r,
|
|
|
|
/etc/machine-id r,
|
|
|
|
|
|
|
|
# The orcexec.* file is JIT compiled code for various GStreamer elements.
|
|
|
|
# If one is blocked the next is used instead.
|
2020-10-25 10:23:34 +01:00
|
|
|
owner @{run}/user/[0-9]*/orcexec.* mrw,
|
2020-09-12 17:19:23 +02:00
|
|
|
#owner @{HOME}/orcexec.* mrw,
|
|
|
|
#owner /tmp/orcexec.* mrw,
|
|
|
|
|
|
|
|
# For SDDM
|
|
|
|
owner /var/lib/sddm/.config/pulse/ rw,
|
|
|
|
owner /var/lib/sddm/.config/pulse/*-{device,stream}-volumes.tdb rw,
|
|
|
|
owner /var/lib/sddm/.config/pulse/*-default-{sink,source} rw,
|
|
|
|
owner /var/lib/sddm/.config/pulse/*-card-database.tdb rw,
|
|
|
|
owner /var/lib/sddm/.config/pulse/cookie rwk,
|
|
|
|
|
|
|
|
# file_inherit
|
|
|
|
owner /dev/tty[0-9]* rw,
|
|
|
|
owner @{HOME}/.xsession-errors w,
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include if exists <local/pulseaudio>
|
2020-09-12 17:19:23 +02:00
|
|
|
}
|