# vim:syntax=apparmor # ------------------------------------------------------------------ # # Copyright (C) 2018-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/udiskie profile udiskie @{exec_path} { include include include include include include include include include include include include include @{exec_path} r, /{usr/,}bin/python3.[0-9] r, /{usr/,}bin/ r, /{usr/,}bin/xdg-open rCx -> open, owner @{HOME}/.config/udiskie/ r, owner @{HOME}/.config/udiskie/config.yml r, owner @{PROC}/@{pid}/fd/ r, owner @{PROC}/@{pid}/mounts r, owner @{PROC}/@{pid}/mountinfo r, /etc/fstab r, /usr/share/glib-2.0/schemas/gschemas.compiled r, # Allowed apps to open /{usr/,}bin/spacefm rPx, # Silencer deny /{usr/,}lib/** w, 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/,}bin/spacefm rPx, # file_inherit owner @{HOME}/.xsession-errors w, } include if exists }