2021-04-01 17:17:47 +02:00
|
|
|
# apparmor.d - Full set of apparmor profiles
|
|
|
|
# Copyright (C) 2019-2021 Mikhail Morfikov
|
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
2020-09-12 17:19:23 +02:00
|
|
|
|
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
|
|
|
|
|
|
|
@{exec_path} = /{usr/,}bin/apt-listchanges
|
|
|
|
profile apt-listchanges @{exec_path} {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/consoles>
|
|
|
|
include <abstractions/python>
|
|
|
|
include <abstractions/nameservice-strict>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
#capability sys_tty_config,
|
|
|
|
|
|
|
|
@{exec_path} r,
|
|
|
|
/{usr/,}bin/python3.[0-9]* r,
|
|
|
|
|
|
|
|
/{usr/,}bin/ r,
|
2020-12-09 10:30:52 +01:00
|
|
|
/{usr/,}bin/{,ba,da}sh rix,
|
2020-09-12 17:19:23 +02:00
|
|
|
/{usr/,}bin/tar rix,
|
|
|
|
|
2021-02-13 15:00:16 +01:00
|
|
|
# Do not strip env to avoid errors like the following:
|
|
|
|
# ERROR: ld.so: object 'libfakeroot-sysv.so' from LD_PRELOAD cannot be preloaded (cannot open
|
|
|
|
# shared object file): ignored.
|
|
|
|
/{usr/,}bin/dpkg-deb rpx,
|
|
|
|
#
|
2020-09-12 17:19:23 +02:00
|
|
|
/{usr/,}bin/sensible-pager rCx -> pager,
|
|
|
|
# Send results using email
|
|
|
|
/{usr/,}sbin/exim4 rPx,
|
|
|
|
|
|
|
|
/usr/share/apt-listchanges/{,**} r,
|
|
|
|
|
|
|
|
/etc/apt/listchanges.conf r,
|
2020-12-09 10:30:52 +01:00
|
|
|
/etc/apt/listchanges.conf.d/{,*} r,
|
|
|
|
|
|
|
|
/etc/apt/apt.conf r,
|
|
|
|
/etc/apt/apt.conf.d/{,*} r,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
/usr/share/dpkg/cputable r,
|
|
|
|
/usr/share/dpkg/tupletable r,
|
|
|
|
|
|
|
|
/var/lib/dpkg/status r,
|
|
|
|
|
|
|
|
/var/lib/apt/listchanges{,-new}.db rw,
|
|
|
|
/var/lib/apt/listchanges-old.db rwl -> /var/lib/apt/listchanges.db,
|
|
|
|
|
2020-12-09 10:30:52 +01:00
|
|
|
/var/cache/apt/archives/ r,
|
|
|
|
|
2020-09-12 17:19:23 +02:00
|
|
|
owner @{PROC}/@{pid}/fd/ r,
|
|
|
|
|
2020-12-09 10:30:52 +01:00
|
|
|
/tmp/ r,
|
2020-09-12 17:19:23 +02:00
|
|
|
owner /tmp/* rw,
|
|
|
|
owner /tmp/apt-listchanges*/ rw,
|
|
|
|
owner /tmp/apt-listchanges*/**/ rw,
|
|
|
|
owner /tmp/apt-listchanges*/*/*/*/*/changelog.gz rw,
|
|
|
|
owner /tmp/apt-listchanges*/*/*/*/*/changelog.Debian*.gz rw,
|
|
|
|
owner /tmp/apt-listchanges*/*/*/*/*/NEWS.Debian.gz rw,
|
|
|
|
owner /tmp/apt-listchanges*/*/*/*/*/*/changelog.gz rw,
|
|
|
|
owner /tmp/apt-listchanges*/*/*/*/*/*/changelog/changelog_to_file rw,
|
|
|
|
owner /tmp/apt-listchanges*/*/*/*/*/*/changelog/simple_changelog rw,
|
|
|
|
|
|
|
|
# The following is needed when apt-listchanges uses debcconf GUI frontends.
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/gtk>
|
|
|
|
include <abstractions/fonts>
|
|
|
|
include <abstractions/fontconfig-cache-read>
|
|
|
|
include <abstractions/freedesktop.org>
|
2020-09-12 17:19:23 +02:00
|
|
|
capability dac_read_search,
|
|
|
|
/{usr/,}bin/lsb_release rPx -> child-lsb_release,
|
2021-03-21 17:04:10 +01:00
|
|
|
/{usr/,}bin/hostname rix,
|
2020-09-12 17:19:23 +02:00
|
|
|
owner @{PROC}/@{pid}/mounts r,
|
|
|
|
@{HOME}/.Xauthority r,
|
|
|
|
|
|
|
|
|
|
|
|
profile pager {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/consoles>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
#capability sys_tty_config,
|
|
|
|
|
|
|
|
/{usr/,}bin/sensible-pager mr,
|
|
|
|
|
2020-12-09 10:30:52 +01:00
|
|
|
/{usr/,}bin/ r,
|
|
|
|
/{usr/,}bin/{,ba,da}sh rix,
|
|
|
|
/{usr/,}bin/which rix,
|
|
|
|
/{usr/,}bin/less rix,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
owner @{HOME}/.less* rw,
|
|
|
|
|
2020-12-09 10:30:52 +01:00
|
|
|
# For shell pwd
|
|
|
|
/root/ r,
|
|
|
|
|
|
|
|
/tmp/ r,
|
2020-09-12 17:19:23 +02:00
|
|
|
owner /tmp/apt-listchanges-tmp*.txt r,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include if exists <local/apt-listchanges>
|
2020-09-12 17:19:23 +02:00
|
|
|
}
|