diff --git a/apparmor.d/abstractions/audio-client b/apparmor.d/abstractions/audio-client new file mode 100644 index 00000000..598f8f23 --- /dev/null +++ b/apparmor.d/abstractions/audio-client @@ -0,0 +1,48 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2024 Alexandre Pujol +# SPDX-License-Identifier: GPL-2.0-only + +# Most programs do not need access to audio devices, audio-client only includes +# configuration files to be used by client applications. + + /usr/share/alsa/** r, + /usr/share/openal/hrtf/{,**} r, + /usr/share/pipewire/client-rt.conf r, + /usr/share/pipewire/client.conf r, + /usr/share/sounds/{,**} r, + + /etc/alsa/conf.d/{,**} r, + /etc/asound.conf r, + /etc/esound/esd.conf r, + /etc/libao.conf r, + /etc/openal/alsoft.conf r, + /etc/pipewire/client.conf r, + /etc/pipewire/client.conf.d/{,**} r, + /etc/pulse/client.conf r, + /etc/pulse/client.conf.d/{,**} r, + /etc/wildmidi/wildmidi.cfg r, + + owner @{HOME}/.alsoftrc r, + owner @{HOME}/.asoundrc r, + owner @{HOME}/.libao r, + owner @{HOME}/.esd_auth r, + + owner @{user_cache_dirs}/event-sound-cache.@{md5}.@{multiarch} rwk, # libcanberra + + owner @{user_config_dirs}/pulse/ rw, + owner @{user_config_dirs}/pulse/client.conf r, + owner @{user_config_dirs}/pulse/client.conf.d/{,*.conf} r, + owner @{user_config_dirs}/pulse/cookie rk, + + owner @{user_share_dirs}/openal/hrtf/{,**} r, + owner @{user_share_dirs}/sounds/__custom/index.theme r, + + owner @{run}/user/@{uid}/pipewire-@{int} rw, + + owner @{run}/user/@{uid}/pulse/ rw, + owner @{run}/user/@{uid}/pulse/native rw, + + /dev/shm/ r, + owner /dev/shm/pulse-shm-@{int} rw, + + include if exists diff --git a/apparmor.d/abstractions/audio2 b/apparmor.d/abstractions/audio2 new file mode 100644 index 00000000..730d7af5 --- /dev/null +++ b/apparmor.d/abstractions/audio2 @@ -0,0 +1,39 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2024 Alexandre Pujol +# SPDX-License-Identifier: GPL-2.0-only + +# Modernised version of , will be merged with it. + + include + + @{run}/udev/data/+sound:card@{int} r, + + @{sys}/class/ r, + @{sys}/class/sound/ r, + + @{PROC}/asound/** rw, + + /dev/admmidi* rw, + /dev/adsp* rw, + /dev/aload* rw, + /dev/amidi* rw, + /dev/audio* rw, + /dev/dmfm* rw, + /dev/dmmidi* rw, + /dev/dsp* rw, + /dev/midi* rw, + /dev/mixer* rw, + /dev/mpu401data rw, + /dev/mpu401stat rw, + /dev/patmgr* rw, + /dev/phone* rw, + /dev/radio* rw, + /dev/rmidi* rw, + /dev/sequencer rw, + /dev/sequencer2 rw, + /dev/smpte* rw, + + /dev/snd/* rw, + /dev/sound/* rw, + + include if exists