# 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/system-config-printer @{exec_path} += /usr/share/system-config-printer/system-config-printer.py profile system-config-printer @{exec_path} flags=(complain) { include include include include include include include include include network inet stream, network inet6 stream, @{exec_path} mrix, /{usr/,}bin/{,ba,da}sh rix, /{usr/,}bin/python3.[0-9]* r, /{usr/,}lib/cups/*/* rCx -> cups, # For HP printers /usr/share/hplip/query.py rPUx, /usr/share/system-config-printer/{,**} r, /usr/share/cups/data/testprint r, /usr/share/glib-2.0/schemas/gschemas.compiled r, /etc/fstab r, /etc/cups/cupsd.conf r, /etc/cupshelpers/preferreddrivers.xml r, /etc/papersize r, # To set the default printer owner @{HOME}/.cups/ rw, owner @{HOME}/.cups/lpoptions rw, owner /tmp/* rw, owner @{PROC}/@{pid}/fd/ r, owner @{PROC}/@{pid}/stat r, owner @{PROC}/@{pid}/mounts r, owner @{PROC}/@{pid}/mountinfo r, include owner @{run}/user/[0-9]*/dconf/ rw, owner @{run}/user/[0-9]*/dconf/user rw, # file_inherit owner /dev/tty[0-9]* rw, profile cups flags=(complain) { include network inet dgram, network inet6 dgram, /{usr/,}lib/cups/*/* mr, /etc/cups/snmp.conf r, } include if exists }