mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-19 09:28:17 +01:00
127 lines
3 KiB
Text
127 lines
3 KiB
Text
# vim:syntax=apparmor
|
|
# ------------------------------------------------------------------
|
|
#
|
|
# Copyright (C) 2019-2021 Mikhail Morfikov
|
|
#
|
|
# This program is free software; you can redistribute it and/or
|
|
# modify it under the terms of version 2 of the GNU General Public
|
|
# License published by the Free Software Foundation.
|
|
#
|
|
# ------------------------------------------------------------------
|
|
|
|
abi <abi/3.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
@{exec_path} = /{usr/,}bin/kanyremote
|
|
profile kanyremote @{exec_path} {
|
|
include <abstractions/base>
|
|
include <abstractions/consoles>
|
|
include <abstractions/X>
|
|
include <abstractions/nameservice-strict>
|
|
include <abstractions/gtk>
|
|
include <abstractions/freedesktop.org>
|
|
include <abstractions/fonts>
|
|
include <abstractions/fontconfig-cache-read>
|
|
include <abstractions/user-download-strict>
|
|
include <abstractions/python>
|
|
include <abstractions/dri-enumerate>
|
|
include <abstractions/mesa>
|
|
include <abstractions/qt5-compose-cache-write>
|
|
include <abstractions/qt5-settings-write>
|
|
include <abstractions/deny-root-dir-access>
|
|
|
|
network inet stream,
|
|
network inet6 stream,
|
|
|
|
@{exec_path} r,
|
|
/{usr/,}bin/{,ba,da}sh rix,
|
|
|
|
/{usr/,}bin/ r,
|
|
/{usr/,}bin/rm rix,
|
|
/{usr/,}bin/{,e}grep rix,
|
|
/{usr/,}bin/cut rix,
|
|
/{usr/,}bin/id rix,
|
|
/{usr/,}bin/which rix,
|
|
/{usr/,}bin/tr rix,
|
|
/{usr/,}bin/gawk rix,
|
|
/{usr/,}bin/head rix,
|
|
/{usr/,}bin/find rix,
|
|
|
|
/{usr/,}bin/anyremote rPx,
|
|
/{usr/,}bin/ps rPx,
|
|
|
|
/{usr/,}bin/killall rCx -> killall,
|
|
/{usr/,}bin/pgrep rCx -> pgrep,
|
|
|
|
/{usr/,}bin/pacmd rPUx,
|
|
/{usr/,}bin/pactl rPUx,
|
|
|
|
# Players
|
|
/{usr/,}bin/smplayer rPUx,
|
|
/{usr/,}bin/amarok rPUx,
|
|
/{usr/,}bin/vlc rPUx,
|
|
/{usr/,}bin/mpv rPUx,
|
|
/{usr/,}bin/strawberry rPUx,
|
|
|
|
owner @{HOME}/ r,
|
|
owner @{HOME}/.anyRemote/{,*} rw,
|
|
|
|
owner @{HOME}/.config/qt5ct/{,**} r,
|
|
/usr/share/qt5ct/** r,
|
|
|
|
/usr/share/anyremote/{,**} r,
|
|
|
|
deny owner @{PROC}/@{pid}/cmdline r,
|
|
deny @{PROC}/sys/kernel/random/boot_id r,
|
|
|
|
/dev/shm/#[0-9]*[0-9] rw,
|
|
|
|
/usr/share/hwdata/pnp.ids r,
|
|
|
|
/var/lib/dbus/machine-id r,
|
|
/etc/machine-id r,
|
|
|
|
# Doc dirs
|
|
deny /usr/local/share/ r,
|
|
deny /usr/share/ r,
|
|
deny /usr/share/doc/ r,
|
|
/usr/share/doc/anyremote{,-data}/ r,
|
|
|
|
|
|
profile killall {
|
|
include <abstractions/base>
|
|
include <abstractions/consoles>
|
|
|
|
capability sys_ptrace,
|
|
|
|
signal (send) set=(int, term, kill),
|
|
|
|
ptrace (read),
|
|
|
|
/{usr/,}bin/killall mr,
|
|
|
|
# The /proc/ dir is needed to avoid the following error:
|
|
# /proc: Permission denied
|
|
@{PROC}/ r,
|
|
@{PROC}/@{pids}/stat r,
|
|
|
|
}
|
|
|
|
profile pgrep {
|
|
include <abstractions/base>
|
|
include <abstractions/consoles>
|
|
|
|
/{usr/,}bin/pgrep mr,
|
|
|
|
# The /proc/ dir and the cmdline file have to be radable to avoid pgrep segfault.
|
|
@{PROC}/ r,
|
|
@{PROC}/@{pids}/cmdline r,
|
|
deny @{PROC}/sys/kernel/osrelease r,
|
|
|
|
/usr/share/anyremote/{,**} r,
|
|
|
|
}
|
|
|
|
include if exists <local/kanyremote>
|
|
}
|