Add profile for spotdl.

This commit is contained in:
tpaau-17DB 2025-04-28 21:21:12 +02:00
parent 3295a1334a
commit 080c4faa22
2 changed files with 42 additions and 0 deletions

View file

@ -28,6 +28,7 @@ profile ffmpeg @{exec_path} {
/var/lib/dbus/machine-id r,
owner @{HOME}/.Xauthority r,
owner @{HOME}/.spotdl/** rw, # For spotdl
owner @{user_music_dirs}/** rw,
owner @{user_videos_dirs}/** rw,

View file

@ -0,0 +1,41 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2017-2021 Mikhail Morfikov
# Copyright (C) 2025 tpaau-17DB <tpaau-17db@tutamail.com>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/4.0>,
include <tunables/global>
@{exec_path} = @{bin}/spotdl
profile spotdl @{exec_path} {
include <abstractions/base>
include <abstractions/nameservice-strict>
include <abstractions/python>
include <abstractions/ssl_certs>
include <abstractions/user-download-strict>
network inet dgram,
network inet6 dgram,
network inet stream,
network inet6 stream,
@{exec_path} mr,
@{python_path} r,
@{bin}/ffmpeg rpx,
@{bin}/ffprobe rpx,
owner @{user_music_dirs}/{,**} rwk,
owner @{HOME}/.spotdl/** rw,
owner @{user_cache_dirs}/spotdl/{,**} rw,
owner @{user_config_dirs}/spotdl/{,**} rw,
owner @{PROC}/@{pid}/fd/ r,
include if exists <local/spotdl>
}
# vim:syntax=apparmor