mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-30 23:05:11 +01:00
d701e39939
Co-authored-by: Mikhail Morfikov <mmorfikov@gmail.com> Signed-off-by: Alexandre Pujol <alexandre@pujol.io>
112 lines
3 KiB
Text
112 lines
3 KiB
Text
# apparmor.d - Full set of apparmor profiles
|
|
# Copyright (C) 2021 Mikhail Morfikov
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
abi <abi/3.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
@{exec_path} = "/home/*/@{XDG_DESKTOP_DIR}/Beyond All Reason.AppImage"
|
|
@{exec_path} += /home/*/@{XDG_DESKTOP_DIR}/BeyondAllReason.AppImage
|
|
profile appimage-beyond-all-reason @{exec_path} {
|
|
include <abstractions/base>
|
|
include <abstractions/consoles>
|
|
include <abstractions/X>
|
|
include <abstractions/gtk>
|
|
include <abstractions/freedesktop.org>
|
|
include <abstractions/fonts>
|
|
include <abstractions/fontconfig-cache-read>
|
|
include <abstractions/nameservice-strict>
|
|
include <abstractions/dri-common>
|
|
include <abstractions/dri-enumerate>
|
|
include <abstractions/mesa>
|
|
include <abstractions/ssl_certs>
|
|
include <abstractions/audio>
|
|
include <abstractions/chromium-common>
|
|
|
|
capability sys_ptrace,
|
|
|
|
network netlink raw,
|
|
network inet dgram,
|
|
network inet6 dgram,
|
|
network inet stream,
|
|
network inet6 stream,
|
|
|
|
@{exec_path} mr,
|
|
|
|
/{usr/,}bin/{,ba,da}sh rix,
|
|
/{usr/,}bin/xmessage rix,
|
|
|
|
/{usr/,}bin/x86_64-linux-gnu-addr2line rix,
|
|
|
|
/{usr/,}bin/fusermount{,3} rCx -> fusermount,
|
|
|
|
mount fstype={fuse,fuse.*} -> /tmp/.mount_Beyond*/,
|
|
|
|
/tmp/.mount_Beyond*/ rw,
|
|
/tmp/.mount_Beyond*/beyond-all-reason rix,
|
|
/tmp/.mount_Beyond*/AppRun rix,
|
|
/tmp/.mount_Beyond*/bin/* rix,
|
|
/tmp/.mount_Beyond*/resources/app.asar.unpacked/node_modules/** rix,
|
|
/tmp/.mount_Beyond*/** r,
|
|
/tmp/.mount_Beyond*/**.so{,.[0-9]*} mr,
|
|
|
|
owner @{user_config_dirs}/Beyond-All-Reason/ rw,
|
|
owner @{user_config_dirs}/Beyond-All-Reason/** rwk,
|
|
|
|
owner "@{HOME}/Beyond All Reason/" rw,
|
|
owner "@{HOME}/Beyond All Reason/**" rwkm,
|
|
owner "@{HOME}/Beyond All Reason/engine/**/spring" rix,
|
|
|
|
owner @{HOME}/.spring/ rw,
|
|
owner @{HOME}/.spring/** rw,
|
|
|
|
@{PROC}/ r,
|
|
owner @{PROC}/@{pid}/fd/ r,
|
|
deny owner @{PROC}/@{pid}/cmdline r,
|
|
@{PROC}/@{pids}/stat r,
|
|
owner @{PROC}/@{pids}/statm r,
|
|
owner @{PROC}/@{pids}/task/ r,
|
|
owner @{PROC}/@{pids}/task/@{tid}/status r,
|
|
owner @{PROC}/@{pid}/oom_{,score_}adj r,
|
|
deny owner @{PROC}/@{pid}/oom_{,score_}adj w,
|
|
@{PROC}sys/fs/inotify/max_user_watches r,
|
|
@{PROC}/sys/kernel/yama/ptrace_scope r,
|
|
|
|
@{sys}/bus/pci/devices/ r,
|
|
@{sys}/devices/pci[0-9]*/**/class r,
|
|
@{sys}/devices/virtual/tty/tty0/active r,
|
|
|
|
/dev/fuse rw,
|
|
|
|
/var/lib/dbus/machine-id r,
|
|
/etc/machine-id r,
|
|
|
|
|
|
profile fusermount {
|
|
include <abstractions/base>
|
|
include <abstractions/nameservice-strict>
|
|
|
|
# To mount anything:
|
|
capability sys_admin,
|
|
|
|
capability dac_read_search,
|
|
|
|
/{usr/,}bin/fusermount{,3} mr,
|
|
|
|
mount fstype={fuse,fuse.*.AppImage} -> /tmp/.mount_*/,
|
|
umount /tmp/.mount_*/,
|
|
|
|
/dev/fuse rw,
|
|
|
|
/etc/fuse.conf r,
|
|
|
|
owner @{HOME}/**.AppImage r,
|
|
owner @{MOUNTS}/*/**.AppImage r,
|
|
|
|
@{PROC}/@{pid}/mounts r,
|
|
|
|
}
|
|
|
|
include if exists <local/appimage-beyond-all-reason>
|
|
}
|