# vim:syntax=apparmor # ------------------------------------------------------------------ # # Copyright (C) 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/blueman-* profile blueman @{exec_path} { include include include include include include include include include network inet stream, network inet6 stream, network bluetooth raw, @{exec_path} mrix, /{usr/,}bin/python3.[0-9]* r, /{usr/,}bin/ r, /{usr/,}bin/dash rix, /{usr/,}bin/xdg-open rCx -> open, /usr/share/blueman/{,**} r, owner @{HOME}/.cache/blueman-tray-[0-9]* rw, owner @{HOME}/.cache/blueman-services-[0-9]* rw, owner @{HOME}/.cache/blueman-adapters-[0-9]* rw, owner @{HOME}/.cache/blueman-manager-[0-9]* rw, owner @{HOME}/.cache/blueman-applet-[0-9]* rw, owner @{HOME}/.cache/obexd/ rw, owner @{HOME}/.cache/obexd/* rw, owner @{HOME}/ r, owner @{HOME}/bluetooth*/ r, owner @{HOME}/bluetooth*/* rw, # For sending a note (disabled since the feature doesn't seem to work) #owner /tmp/* rw, #owner /var/tmp/* rw, #owner /tmp/note*.vnt rw, /var/lib/blueman/network.state r, owner @{PROC}/@{pid}/fd/ r, owner @{PROC}/@{pid}/mounts r, owner @{PROC}/@{pid}/cmdline r, include owner @{run}/user/[0-9]*/dconf/ rw, owner @{run}/user/[0-9]*/dconf/user rw, /usr/share/glib-2.0/schemas/gschemas.compiled r, /dev/rfkill r, /dev/shm/ r, /var/lib/dbus/machine-id r, /etc/machine-id 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, /{usr/,}bin/uname rix, /{usr/,}bin/xprop rix, /{usr/,}bin/file rix, /{usr/,}bin/dbus-send rix, /{usr/,}bin/mimetype rix, /usr/share/perl5/** r, /etc/magic r, owner @{HOME}/ r, owner @{HOME}/bluetooth*/* r, owner @{run}/user/[0-9]*/ r, # Allowed apps to open /{usr/,}lib/firefox/firefox rPx, /{usr/,}bin/spacefm rPx, # file_inherit owner @{HOME}/.xsession-errors w, } include if exists }