# apparmor.d - Full set of apparmor profiles # Copyright (C) 2019-2021 Mikhail Morfikov # SPDX-License-Identifier: GPL-2.0-only abi , include @{exec_path} = /{usr/,}bin/flameshot profile flameshot @{exec_path} { include include include include include include include include include include include include include include include include network inet dgram, network inet6 dgram, network inet stream, network inet6 stream, network netlink raw, network netlink dgram, @{exec_path} mr, /{usr/,}bin/whoami rix, /{usr/,}bin/xdg-open rCx -> open, # Flameshot home files owner @{HOME}/.config/flameshot/ rw, owner @{HOME}/.config/flameshot/flameshot.ini rw, owner @{HOME}/.config/flameshot/#[0-9]*[0-9] rw, owner @{HOME}/.config/flameshot/flameshot.ini* rwl -> @{HOME}/.config/flameshot/#[0-9]*[0-9], owner @{HOME}/.config/flameshot/flameshot.ini.lock rwk, owner @{HOME}/.config/qt5ct/{,**} r, /usr/share/qt5ct/** r, /var/lib/dbus/machine-id r, /etc/machine-id r, /usr/share/hwdata/pnp.ids r, owner /tmp/.*/{,s} rw, owner /tmp/*= rw, owner /tmp/qipc_{systemsem,sharedmemory}_*[0-9a-f]* rw, deny owner @{PROC}/@{pid}/cmdline r, deny @{PROC}/sys/kernel/random/boot_id r, owner @{PROC}/@{pid}/mountinfo r, owner @{PROC}/@{pid}/mounts r, /etc/fstab r, /dev/shm/#[0-9]*[0-9] rw, # file_inherit owner /dev/tty[0-9]* rw, owner @{HOME}/.xsession-errors 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 # file_inherit owner @{HOME}/.xsession-errors w, } include if exists }