add profiles for cmus and ouch (#408)

* add profiles for cmus and ouch

* minor corrections
This commit is contained in:
valoq 2024-07-12 20:11:32 +01:00 committed by Alexandre Pujol
parent d864f5c975
commit bd1239b46a
Failed to generate hash of commit
2 changed files with 57 additions and 0 deletions

View file

@ -0,0 +1,31 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2024 valoq <valoq@mailbox.org>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{bin}/cmus
profile cmus @{exec_path} {
include <abstractions/base>
include <abstractions/audio-client>
@{exec_path} mr,
/usr/share/cmus/{,**} r,
/usr/share/terminfo/{,**} r,
/etc/machine-id r,
owner @{user_music_dirs}/{,**} r,
owner @{user_config_dirs}/ r,
owner @{user_config_dirs}/cmus/{,**} rw,
owner @{run}/user/@{uid}/cmus-socket w,
/dev/shm/ r,
include if exists <local/cmus>
}

View file

@ -0,0 +1,26 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2024 valoq <valoq@mailbox.org>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{bin}/ouch
profile ouch @{exec_path} {
include <abstractions/base>
include <abstractions/user-read-strict>
include <abstractions/user-write-strict>
@{exec_path} mr,
owner @{HOME}/.tmp@{rand6}/{,**} rw,
@{sys}/fs/cgroup/user.slice/cpu.max r,
@{sys}/fs/cgroup/user.slice/user-@{uid}.slice/cpu.max r,
@{sys}/fs/cgroup/user.slice/user-@{uid}.slice/session-@{int}.scope/cpu.max r,
owner @{PROC}/@{pid}/cgroup r,
include if exists <local/ouch>
}