apparmor.d/apparmor.d/groups/apt/apt-listchanges

72 lines
1.7 KiB
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2019-2021 Mikhail Morfikov
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/4.0>,
include <tunables/global>
@{exec_path} = @{bin}/apt-listchanges
profile apt-listchanges @{exec_path} {
include <abstractions/base>
include <abstractions/consoles>
include <abstractions/python>
include <abstractions/nameservice-strict>
capability dac_read_search,
@{exec_path} r,
@{python_path} r,
@{bin}/ r,
@{sh_path} rix,
@{bin}/tar rix,
# 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.
@{bin}/dpkg-deb px,
@{pager_path} Cx -> pager,
@{bin}/dpkg Px -> child-dpkg,
@{sbin}/exim4 Px, # Send results using email
/usr/share/apt-listchanges/{,**} r,
/etc/apt/listchanges.conf r,
/etc/apt/listchanges.conf.d/{,*} r,
/etc/apt/apt.conf r,
/etc/apt/apt.conf.d/{,*} r,
/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,
/var/cache/apt/archives/ r,
/tmp/ r,
owner @{tmp}/@{word8} rw,
owner @{tmp}/apt-listchanges@{word8}/ rw,
owner @{tmp}/apt-listchanges@{word8}/** rw,
owner @{PROC}/@{pid}/fd/ r,
profile pager {
include <abstractions/base>
include <abstractions/app/pager>
owner @{tmp}/apt-listchanges-tmp*.txt r,
include if exists <local/apt-listchanges_pager>
}
include if exists <local/apt-listchanges>
}
# vim:syntax=apparmor