mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-11-15 16:03:51 +01:00
467c38724a
apparmor.d equivalent of https://gitlab.com/apparmor/apparmor/-/merge_requests/1179
138 lines
3.2 KiB
Plaintext
138 lines
3.2 KiB
Plaintext
# apparmor.d - Full set of apparmor profiles
|
|
# Copyright (C) 2017-2021 Mikhail Morfikov
|
|
# Copyright (C) 2023-2024 Alexandre Pujol <alexandre@pujol.io>
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
abi <abi/3.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
@{exec_path} = @{bin}/psi-plus
|
|
profile psi-plus @{exec_path} {
|
|
include <abstractions/base>
|
|
include <abstractions/consoles>
|
|
include <abstractions/dri-enumerate>
|
|
include <abstractions/enchant>
|
|
include <abstractions/fontconfig-cache-read>
|
|
include <abstractions/fonts>
|
|
include <abstractions/freedesktop.org>
|
|
include <abstractions/gtk>
|
|
include <abstractions/mesa>
|
|
include <abstractions/nameservice-strict>
|
|
include <abstractions/qt5-compose-cache-write>
|
|
include <abstractions/qt5-settings-write>
|
|
include <abstractions/ssl_certs>
|
|
include <abstractions/thumbnails-cache-read>
|
|
include <abstractions/user-download-strict>
|
|
include <abstractions/X>
|
|
|
|
network inet dgram,
|
|
network inet6 dgram,
|
|
network inet stream,
|
|
network inet6 stream,
|
|
network netlink dgram,
|
|
|
|
signal (send) set=(term, kill) peer=lsb_release,
|
|
|
|
@{exec_path} mr,
|
|
|
|
@{bin}/aplay rCx -> aplay,
|
|
@{bin}/gpg{,2} rCx -> gpg,
|
|
@{bin}/lsb_release rPx -> lsb_release,
|
|
@{bin}/xdg-open rCx -> open,
|
|
@{lib}/firefox/firefox rPUx,
|
|
|
|
/usr/share/hwdata/pnp.ids r,
|
|
/usr/share/psi-plus/{,**} r,
|
|
/usr/share/qt5ct/** r,
|
|
|
|
/etc/debian_version r,
|
|
/etc/fstab r,
|
|
/etc/machine-id r,
|
|
/var/lib/dbus/machine-id r,
|
|
|
|
owner @{HOME}/ r,
|
|
owner @{user_cache_dirs}/ rw,
|
|
owner @{user_cache_dirs}/#@{int} rw,
|
|
owner @{user_cache_dirs}/psi+/{,**} rw,
|
|
owner @{user_config_dirs}/autostart/psi-plus.desktop rw,
|
|
owner @{user_config_dirs}/psi+/ rw,
|
|
owner @{user_config_dirs}/psi+/** rwkl -> @{user_config_dirs}/psi+/#@{int},
|
|
owner @{user_config_dirs}/qt5ct/{,**} r,
|
|
owner @{user_share_dirs}/psi+/ rw,
|
|
owner @{user_share_dirs}/psi+/** rwk,
|
|
|
|
owner /tmp/#@{int} rw,
|
|
owner /tmp/Psi+.* rwl -> /tmp/#@{int},
|
|
owner /var/tmp/etilqs_@{hex} rw,
|
|
|
|
@{run}/systemd/inhibit/[0-9]*.ref rw,
|
|
|
|
owner @{PROC}/@{pid}/mountinfo r,
|
|
owner @{PROC}/@{pid}/mounts r,
|
|
deny @{PROC}/sys/kernel/random/boot_id r,
|
|
deny owner @{PROC}/@{pid}/cmdline r,
|
|
|
|
/dev/shm/#@{int} rw,
|
|
|
|
# file_inherit
|
|
owner /dev/tty@{int} rw,
|
|
|
|
profile aplay {
|
|
include <abstractions/base>
|
|
include <abstractions/audio-client>
|
|
|
|
@{bin}/aplay mr,
|
|
#@{bin}/pulseaudio rPUx,
|
|
|
|
/var/lib/dbus/machine-id r,
|
|
/etc/machine-id r,
|
|
|
|
/usr/share/psi-plus/sound/** r,
|
|
|
|
owner @{HOME}/.Xauthority r,
|
|
|
|
# file_inherit
|
|
/dev/dri/card@{int} rw,
|
|
|
|
}
|
|
|
|
profile gpg {
|
|
include <abstractions/base>
|
|
|
|
@{bin}/gpg{,2} mr,
|
|
|
|
owner @{HOME}/@{XDG_GPG_DIR}/ rw,
|
|
owner @{HOME}/@{XDG_GPG_DIR}/** rwkl -> @{HOME}/@{XDG_GPG_DIR}/**,
|
|
|
|
# file_inherit
|
|
/dev/dri/card@{int} rw,
|
|
|
|
}
|
|
|
|
profile open {
|
|
include <abstractions/base>
|
|
include <abstractions/xdg-open>
|
|
|
|
@{bin}/xdg-open mr,
|
|
|
|
@{sh_path} rix,
|
|
@{bin}/{m,g,}awk rix,
|
|
@{bin}/readlink rix,
|
|
@{bin}/basename rix,
|
|
|
|
owner @{HOME}/ r,
|
|
|
|
owner @{run}/user/@{uid}/ r,
|
|
|
|
# Allowed apps to open
|
|
@{lib}/firefox/firefox rPUx,
|
|
|
|
# file_inherit
|
|
owner @{HOME}/.xsession-errors w,
|
|
|
|
}
|
|
|
|
include if exists <local/psi-plus>
|
|
}
|