# apparmor.d - Full set of apparmor profiles # Copyright (C) 2021 Mikhail Morfikov # SPDX-License-Identifier: GPL-2.0-only abi , include # 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 include include include include include include include include include include include include include 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, /{usr/,}bin/xdg-screensaver rCx -> xdg-screensaver, /{usr/,}bin/youtube-dl rPx, /{usr/,}lib/firefox/firefox rPx, # 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 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, profile xdg-screensaver { include include /{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, } include if exists }