92 lines
2.6 KiB
Text
92 lines
2.6 KiB
Text
# apparmor.d - Full set of apparmor profiles
|
|
# Copyright (C) 2020-2021 Mikhail Morfikov
|
|
# Copyright (C) 2021-2023 Alexandre Pujol <alexandre@pujol.io>
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
abi <abi/3.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
@{name} = spotify
|
|
@{lib_dirs} = /opt/spotify/
|
|
@{config_dirs} = @{user_config_dirs}/@{name}
|
|
@{cache_dirs} = @{user_cache_dirs}/@{name}
|
|
|
|
@{exec_path} = @{bin}/@{name} @{lib_dirs}/@{name}
|
|
profile spotify @{exec_path} {
|
|
include <abstractions/base>
|
|
include <abstractions/chromium-common>
|
|
include <abstractions/dconf-write>
|
|
include <abstractions/fonts>
|
|
include <abstractions/freedesktop.org>
|
|
include <abstractions/gtk>
|
|
include <abstractions/mesa>
|
|
include <abstractions/nameservice-strict>
|
|
include <abstractions/opencl>
|
|
include <abstractions/openssl>
|
|
include <abstractions/ssl_certs>
|
|
include <abstractions/vulkan>
|
|
|
|
network inet dgram,
|
|
network inet6 dgram,
|
|
network inet stream,
|
|
network inet6 stream,
|
|
network netlink raw,
|
|
|
|
@{exec_path} mrix,
|
|
|
|
@{lib_dirs}/{,**} r,
|
|
@{lib_dirs}/*.so* mr,
|
|
|
|
@{bin}/xdg-open rPx -> child-open,
|
|
@{lib}/@{multiarch}/glib-[0-9]*/gio-launch-desktop rPx -> child-open,
|
|
@{lib}/gio-launch-desktop rPx -> child-open,
|
|
|
|
/etc/gnutls/config r,
|
|
/etc/libva.conf r,
|
|
/etc/machine-id r,
|
|
/etc/spotify-adblock/* r,
|
|
/var/lib/dbus/machine-id r,
|
|
|
|
owner @{user_music_dirs}/{,**} r,
|
|
|
|
owner @{user_config_dirs}/pulse/client.conf r,
|
|
owner @{user_config_dirs}/pulse/cookie rk,
|
|
owner @{user_config_dirs}/spotify-adblock/* r,
|
|
|
|
owner @{config_dirs}/ rw,
|
|
owner @{config_dirs}/** rwl -> @{config_dirs}/**,
|
|
owner @{config_dirs}/*/WidevineCdm/**/libwidevinecdm.so rm,
|
|
|
|
owner @{cache_dirs}/ rw,
|
|
owner @{cache_dirs}/** rwk -> @{cache_dirs}/**,
|
|
owner @{cache_dirs}/WidevineCdm/**/libwidevinecdm.so rm,
|
|
|
|
owner @{run}/user/@{uid}/pulse/ r,
|
|
|
|
@{sys}/devices/@{pci}/irq r,
|
|
@{sys}/devices/system/cpu/cpu@{int}/cache/{,**} r,
|
|
@{sys}/devices/system/cpu/cpu@{int}/topology/{,**} r,
|
|
@{sys}/devices/system/cpu/kernel_max r,
|
|
@{sys}/devices/system/cpu/present r,
|
|
@{sys}/devices/virtual/tty/tty@{int}/active r,
|
|
|
|
@{PROC}/ r,
|
|
@{PROC}/@{pid}/stat r,
|
|
@{PROC}/sys/fs/inotify/max_user_watches r,
|
|
owner @{PROC}/@{pid}/cmdline r,
|
|
owner @{PROC}/@{pid}/comm r,
|
|
owner @{PROC}/@{pid}/fd/ r,
|
|
owner @{PROC}/@{pid}/oom_score_adj w,
|
|
owner @{PROC}/@{pid}/statm r,
|
|
owner @{PROC}/@{pid}/task/ r,
|
|
owner @{PROC}/@{pid}/task/@{tid}/stat r,
|
|
owner @{PROC}/@{pid}/task/@{tid}/status r,
|
|
|
|
/dev/tty rw,
|
|
owner /dev/shm/pulse-shm-@{int} r,
|
|
|
|
deny @{user_share_dirs}/gvfs-metadata/* r,
|
|
|
|
include if exists <local/spotify>
|
|
}
|