2020-09-12 17:19:23 +02:00
|
|
|
# vim:syntax=apparmor
|
|
|
|
# ------------------------------------------------------------------
|
|
|
|
#
|
2021-01-10 16:35:07 +01:00
|
|
|
# Copyright (C) 2020-2021 Mikhail Morfikov
|
2020-09-12 17:19:23 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
# ------------------------------------------------------------------
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
abi <abi/3.0>,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include <tunables/global>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2021-02-13 15:00:16 +01:00
|
|
|
@{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) {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/python>
|
|
|
|
include <abstractions/nameservice-strict>
|
|
|
|
include <abstractions/gtk>
|
|
|
|
include <abstractions/fonts>
|
|
|
|
include <abstractions/fontconfig-cache-read>
|
|
|
|
include <abstractions/freedesktop.org>
|
|
|
|
include <abstractions/openssl>
|
|
|
|
include <abstractions/deny-root-dir-access>
|
|
|
|
|
|
|
|
network inet stream,
|
|
|
|
network inet6 stream,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
@{exec_path} mrix,
|
|
|
|
|
2020-12-09 10:30:52 +01:00
|
|
|
/{usr/,}bin/{,ba,da}sh rix,
|
2020-09-12 17:19:23 +02:00
|
|
|
/{usr/,}bin/python3.[0-9]* r,
|
|
|
|
|
2021-02-13 15:00:16 +01:00
|
|
|
/{usr/,}lib/cups/*/* rCx -> cups,
|
|
|
|
|
|
|
|
# For HP printers
|
|
|
|
/usr/share/hplip/query.py rPUx,
|
|
|
|
|
2020-09-12 17:19:23 +02:00
|
|
|
/usr/share/system-config-printer/{,**} r,
|
|
|
|
|
2021-02-13 15:00:16 +01:00
|
|
|
/usr/share/cups/data/testprint r,
|
|
|
|
|
|
|
|
/usr/share/glib-2.0/schemas/gschemas.compiled r,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
/etc/fstab r,
|
|
|
|
|
|
|
|
/etc/cups/cupsd.conf r,
|
|
|
|
|
2021-02-13 15:00:16 +01:00
|
|
|
/etc/cupshelpers/preferreddrivers.xml r,
|
|
|
|
|
|
|
|
/etc/papersize r,
|
|
|
|
|
|
|
|
# To set the default printer
|
|
|
|
owner @{HOME}/.cups/ rw,
|
|
|
|
owner @{HOME}/.cups/lpoptions rw,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
owner /tmp/* rw,
|
|
|
|
|
2021-02-13 15:00:16 +01:00
|
|
|
owner @{PROC}/@{pid}/fd/ r,
|
|
|
|
owner @{PROC}/@{pid}/stat r,
|
|
|
|
owner @{PROC}/@{pid}/mounts r,
|
|
|
|
owner @{PROC}/@{pid}/mountinfo r,
|
|
|
|
|
|
|
|
include <abstractions/dconf>
|
2021-03-14 18:57:00 +01:00
|
|
|
owner @{run}/user/[0-9]*/dconf/ rw,
|
|
|
|
owner @{run}/user/[0-9]*/dconf/user rw,
|
2021-02-13 15:00:16 +01:00
|
|
|
|
2020-09-12 17:19:23 +02:00
|
|
|
# file_inherit
|
|
|
|
owner /dev/tty[0-9]* rw,
|
|
|
|
|
2021-02-13 15:00:16 +01:00
|
|
|
|
|
|
|
profile cups flags=(complain) {
|
|
|
|
include <abstractions/base>
|
|
|
|
|
|
|
|
network inet dgram,
|
|
|
|
network inet6 dgram,
|
|
|
|
|
|
|
|
/{usr/,}lib/cups/*/* mr,
|
|
|
|
|
|
|
|
/etc/cups/snmp.conf r,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include if exists <local/system-config-printer>
|
2020-09-12 17:19:23 +02:00
|
|
|
}
|