apparmor.d/profiles/hypnotix

116 lines
2.7 KiB
Plaintext
Raw Normal View History

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2021 Mikhail Morfikov
# SPDX-License-Identifier: GPL-2.0-only
2021-01-10 16:35:07 +01:00
abi <abi/3.0>,
include <tunables/global>
# Playlist extensions:
# m3u, m3u8, pls
@{hypnotix_ext} = [mM]3[uU]{,8}
@{hypnotix_ext} += [pP][lL][sS]
@{exec_path} = /{usr/,}bin/hypnotix
@{exec_path} += /{usr/,}lib/hypnotix/hypnotix.py
profile hypnotix @{exec_path} {
include <abstractions/base>
include <abstractions/opencl-intel>
include <abstractions/vulkan>
include <abstractions/audio>
include <abstractions/gtk>
include <abstractions/fonts>
include <abstractions/fontconfig-cache-read>
include <abstractions/freedesktop.org>
include <abstractions/mesa>
include <abstractions/nameservice-strict>
include <abstractions/user-download-strict>
include <abstractions/openssl>
include <abstractions/ssl_certs>
include <abstractions/python>
signal (send) set=(term, kill) peer=youtube-dl,
network inet dgram,
network inet6 dgram,
network inet stream,
network inet6 stream,
network netlink raw,
@{exec_path} rix,
/{usr/,}bin/python3.[0-9]* r,
/{usr/,}bin/{,ba,da}sh rix,
/{usr/,}sbin/ldconfig rix,
/{usr/,}bin/mkdir rix,
2021-03-13 09:47:36 +01:00
/{usr/,}bin/xdg-screensaver rCx -> xdg-screensaver,
2021-01-10 16:35:07 +01:00
2021-03-13 09:47:36 +01:00
/{usr/,}bin/youtube-dl rPx,
/{usr/,}lib/firefox/firefox rPx,
2021-01-10 16:35:07 +01:00
# Which files hypnotix should be able to open
/ r,
/home/ r,
owner @{HOME}/ r,
owner @{HOME}/**/ r,
/media/ r,
owner /media/**/ r,
owner /{home,media}/**.@{hypnotix_ext} r,
# To be able to store settings
include <abstractions/dconf>
owner @{run}/user/[0-9]*/dconf/ rw,
owner @{run}/user/[0-9]*/dconf/user rw,
/usr/share/hypnotix/{,**} r,
owner @{HOME}/.hypnotix/ rw,
owner @{HOME}/.hypnotix/** rw,
owner @{PROC}/@{pid}/fd/ r,
owner @{PROC}/@{pid}/mounts r,
deny owner @{PROC}/@{pid}/cmdline r,
@{sys}/devices/pci[0-9]*/**/drm/ r,
/dev/ r,
/usr/share/glib-2.0/schemas/gschemas.compiled r,
/etc/vdpau_wrapper.cfg r,
/var/lib/dbus/machine-id r,
/etc/machine-id r,
# Silencer
/{usr/,}lib/hypnotix/** w,
2021-03-13 09:47:36 +01:00
profile xdg-screensaver {
include <abstractions/base>
include <abstractions/consoles>
/{usr/,}bin/xdg-screensaver mr,
/{usr/,}bin/{,ba,da}sh rix,
/{usr/,}bin/mv rix,
/{usr/,}bin/{,e}grep rix,
/{usr/,}bin/sed rix,
/{usr/,}bin/which rix,
/{usr/,}bin/xset rix,
/{usr/,}bin/xautolock rix,
/{usr/,}bin/dbus-send rix,
owner @{HOME}/.Xauthority r,
# file_inherit
/dev/dri/card[0-9]* rw,
network inet stream,
network inet6 stream,
}
2021-01-10 16:35:07 +01:00
include if exists <local/hypnotix>
}