# vim:syntax=apparmor # ------------------------------------------------------------------ # # Copyright (C) 2020-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 , include @{exec_path} = /{usr/,}bin/cawbird profile cawbird @{exec_path} { include include include include include include include include include include @{exec_path} mr, /{usr/,}bin/{,ba,da}sh rix, /{usr/,}bin/xdg-open rCx -> open, /{usr/,}bin/exo-open rCx -> open, /{usr/,}lib/@{multiarch}/gstreamer[0-9]*.[0-9]*/gstreamer-[0-9]*.[0-9]*/gst-plugin-scanner rPx, owner @{HOME}/.config/cawbird/ rw, owner @{HOME}/.config/cawbird/** rwk, owner @{HOME}/.cache/ rw, owner @{HOME}/.cache/cawbird-* rw, owner @{HOME}/.cache/gstreamer-[0-9]*/ rw, owner @{HOME}/.cache/gstreamer-[0-9]*/registry.*.bin{,.tmp*} rw, /usr/share/glib-2.0/schemas/gschemas.compiled r, /usr/share/xml/iso-codes/iso_[0-9]*-[0-9]*.xml r, # This is needed as cawbird stores its settings in the dconf database. include owner @{run}/user/[0-9]*/dconf/ rw, owner @{run}/user/[0-9]*/dconf/user rw, /var/lib/dbus/machine-id r, /etc/machine-id r, @{sys}/devices/system/node/ r, @{sys}/devices/system/node/node0/meminfo r, # The orcexec.* file is JIT compiled code for various GStreamer elements. # If one is blocked the next is used instead. owner @{run}/user/[0-9]*/orcexec.* mrw, #owner @{HOME}/orcexec.* mrw, #owner /tmp/orcexec.* mrw, /dev/ r, /dev/dri/ r, owner @{PROC}/@{pid}/fd/ r, profile open { include include /{usr/,}bin/xdg-open mr, /{usr/,}bin/{,ba,da}sh rix, /{usr/,}bin/gawk rix, /{usr/,}bin/readlink rix, /{usr/,}bin/basename rix, owner @{HOME}/ r, owner @{run}/user/[0-9]*/ r, # Allowed apps to open /{usr/,}lib/firefox/firefox rPUx, # file_inherit owner @{HOME}/.xsession-errors w, } include if exists }