apparmor.d/profiles/system-config-printer

89 lines
2 KiB
Text
Raw Normal View History

# vim:syntax=apparmor
# ------------------------------------------------------------------
#
2021-01-10 16:35:07 +01:00
# 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.
#
# ------------------------------------------------------------------
2020-12-10 22:33:39 +01:00
abi <abi/3.0>,
2020-12-10 22:33:39 +01:00
include <tunables/global>
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,
@{exec_path} mrix,
2020-12-09 10:30:52 +01:00
/{usr/,}bin/{,ba,da}sh rix,
/{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,
/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,
/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,
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
# 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>
}