mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-02-07 02:35:06 +01:00
158 lines
3.4 KiB
Text
158 lines
3.4 KiB
Text
# apparmor.d - Full set of apparmor profiles
|
|
# Copyright (C) 2019-2021 Mikhail Morfikov
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
abi <abi/3.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
@{exec_path} = @{bin}/anyremote
|
|
profile anyremote @{exec_path} {
|
|
include <abstractions/base>
|
|
include <abstractions/consoles>
|
|
include <abstractions/nameservice-strict>
|
|
|
|
signal (receive) set=(int, term, kill),
|
|
signal (send) set=(term, kill),
|
|
|
|
network inet stream,
|
|
network inet6 stream,
|
|
|
|
@{exec_path} mr,
|
|
|
|
@{bin}/{,ba,da}sh rix,
|
|
@{bin}/cat rix,
|
|
@{bin}/rm rix,
|
|
@{bin}/{,e}grep rix,
|
|
@{bin}/cut rix,
|
|
@{bin}/id rix,
|
|
@{bin}/mv rix,
|
|
@{bin}/expr rix,
|
|
@{bin}/which{,.debianutils} rix,
|
|
@{bin}/head rix,
|
|
@{bin}/wc rix,
|
|
@{bin}/tr rix,
|
|
@{bin}/mkdir rix,
|
|
@{bin}/tail rix,
|
|
@{bin}/{m,g,}awk rix,
|
|
@{bin}/sed rix,
|
|
@{bin}/md5sum rix,
|
|
@{bin}/basename rix,
|
|
@{bin}/sleep rix,
|
|
@{bin}/find rix,
|
|
|
|
@{bin}/convert-im6.q16 rCx -> imagemagic,
|
|
@{bin}/killall rCx -> killall,
|
|
@{bin}/pgrep rCx -> pgrep,
|
|
@{lib}/qt5/bin/qdbus rCx -> qdbus,
|
|
@{bin}/curl rCx -> curl,
|
|
|
|
@{bin}/pacmd rPx,
|
|
@{bin}/pactl rPx,
|
|
@{bin}/wmctrl rPx,
|
|
@{bin}/qtchooser rPx,
|
|
@{bin}/ps rPx,
|
|
|
|
# Players
|
|
@{bin}/smplayer rPx,
|
|
@{bin}/amarok rPx,
|
|
@{bin}/vlc rPx,
|
|
@{bin}/mpv rPx,
|
|
@{bin}/strawberry rPx,
|
|
|
|
owner /tmp/amarok_covers/ rw,
|
|
owner /tmp/*.png rw,
|
|
|
|
# For shell pwd
|
|
owner @{HOME}/ r,
|
|
|
|
owner @{HOME}/.anyRemote/{,**} rw,
|
|
owner @{HOME}/.anyRemote/imdb-mf.sh rix,
|
|
|
|
/usr/share/anyremote/{,**} r,
|
|
/usr/share/anyremote/cfg-data/Utils/*.sh rix,
|
|
|
|
deny @{PROC}/sys/kernel/osrelease r,
|
|
|
|
owner @{HOME}/.Xauthority r,
|
|
|
|
|
|
profile imagemagic {
|
|
include <abstractions/base>
|
|
|
|
@{bin}/convert-im6.q16 mr,
|
|
|
|
/usr/share/ImageMagick-[0-9]/*.xml rw,
|
|
/etc/ImageMagick-[0-9]/*.xml r,
|
|
|
|
/usr/share/anyremote/cfg-data/Icons/common/*.png r,
|
|
owner @{HOME}/.anyRemote/*.png rw,
|
|
|
|
owner @{HOME}/.kde/share/apps/amarok/albumcovers/cache/* r,
|
|
|
|
/tmp/ r,
|
|
owner /tmp/*.png rw,
|
|
owner /tmp/amarok_covers/* rw,
|
|
owner /tmp/magick-* rw,
|
|
|
|
}
|
|
|
|
profile killall {
|
|
include <abstractions/base>
|
|
include <abstractions/consoles>
|
|
|
|
capability sys_ptrace,
|
|
|
|
signal (send) set=(term, kill),
|
|
|
|
ptrace (read),
|
|
|
|
@{bin}/killall mr,
|
|
|
|
# The /proc/ dir is needed to avoid the following error:
|
|
# /proc: Permission denied
|
|
@{PROC}/ r,
|
|
@{PROC}/@{pids}/stat r,
|
|
|
|
# file_inherit
|
|
owner @{HOME}/.anyRemote/anyremote.stdout w,
|
|
|
|
}
|
|
|
|
profile pgrep {
|
|
include <abstractions/base>
|
|
include <abstractions/consoles>
|
|
|
|
signal (send) set=(term, kill),
|
|
|
|
@{bin}/pgrep mr,
|
|
|
|
# The /proc/ dir and the cmdline have to be radable to avoid pgrep segfault.
|
|
@{PROC}/ r,
|
|
@{PROC}/@{pids}/cmdline r,
|
|
deny @{PROC}/sys/kernel/osrelease r,
|
|
|
|
# file_inherit
|
|
owner @{HOME}/.anyRemote/anyremote.stdout w,
|
|
|
|
}
|
|
|
|
profile curl {
|
|
include <abstractions/base>
|
|
include <abstractions/nameservice-strict>
|
|
include <abstractions/openssl>
|
|
include <abstractions/ssl_certs>
|
|
|
|
@{bin}/curl mr,
|
|
|
|
}
|
|
|
|
profile qdbus {
|
|
include <abstractions/base>
|
|
|
|
@{lib}/qt5/bin/qdbus mr,
|
|
|
|
}
|
|
|
|
include if exists <local/anyremote>
|
|
}
|