88 lines
2.4 KiB
Text
88 lines
2.4 KiB
Text
# apparmor.d - Full set of apparmor profiles
|
|
# Copyright (C) 2019-2022 Mikhail Morfikov
|
|
# Copyright (C) 2022-2024 Alexandre Pujol <alexandre@pujol.io>
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
abi <abi/4.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
@{exec_path} = @{bin}/dpkg-preconfigure
|
|
profile dpkg-preconfigure @{exec_path} {
|
|
include <abstractions/base>
|
|
include <abstractions/consoles>
|
|
include <abstractions/perl>
|
|
include <abstractions/nameservice-strict>
|
|
|
|
#capability sys_tty_config,
|
|
|
|
@{exec_path} r,
|
|
|
|
@{sh_path} rix,
|
|
@{bin}/{,e}grep rix,
|
|
@{bin}/{,g,m}awk rix,
|
|
@{bin}/cat rix,
|
|
@{bin}/debconf-escape rix,
|
|
@{bin}/dialog rix,
|
|
@{bin}/expr rix,
|
|
@{bin}/locale rix,
|
|
@{bin}/readlink rix,
|
|
@{bin}/sed rix,
|
|
@{bin}/sort rix,
|
|
@{bin}/stty rix,
|
|
@{bin}/tr rix,
|
|
|
|
@{bin}/findmnt rPx,
|
|
@{bin}/dpkg rPx -> child-dpkg,
|
|
@{bin}/apt-extracttemplates rPx,
|
|
@{bin}/whiptail rPx,
|
|
@{lib}/apt/apt-extracttemplates rPx,
|
|
|
|
/usr/share/debconf/confmodule r,
|
|
|
|
/etc/debconf.conf r,
|
|
/etc/default/grub r,
|
|
/etc/default/mdadm r,
|
|
/etc/inputrc r,
|
|
/etc/locale.gen r,
|
|
/etc/mdadm/mdadm.conf r,
|
|
/etc/shadow r,
|
|
/etc/ssh/sshd_config r,
|
|
|
|
/var/lib/locales/supported.d/{,*} r,
|
|
|
|
/var/cache/debconf/tmp.ci/ w,
|
|
|
|
owner @{tmp}/*.template.* rw,
|
|
owner @{tmp}/*.config.* rwPUx,
|
|
|
|
/var/lib/dbus/machine-id r,
|
|
owner /var/cache/debconf/ rw,
|
|
owner /var/cache/debconf/{config,passwords,templates}.dat{,-old,-new} rwk,
|
|
owner /var/cache/debconf/tmp.ci/ r,
|
|
owner /var/cache/debconf/tmp.ci/* rix,
|
|
owner /var/cache/debconf/tmp.ci/*.config.@{rand6} w,
|
|
owner /var/cache/debconf/tmp.ci/*.passwords.@{rand6} w,
|
|
owner /var/cache/debconf/tmp.ci/*.template.@{rand6} w,
|
|
owner /var/log/unattended-upgrades/unattended-upgrades-dpkg.log rw,
|
|
|
|
@{run}/user/@{uid}/.mutter-Xwaylandauth.@{rand6} r,
|
|
@{run}/user/@{uid}/pk-debconf-socket rw,
|
|
|
|
owner @{PROC}/@{pid}/fd/ r,
|
|
|
|
# The following is needed when dpkg-preconfigure uses debcconf GUI frontends.
|
|
include <abstractions/gtk>
|
|
include <abstractions/fonts>
|
|
include <abstractions/fontconfig-cache-read>
|
|
include <abstractions/freedesktop.org>
|
|
capability dac_read_search,
|
|
@{bin}/lsb_release rPx -> lsb_release,
|
|
@{bin}/hostname rix,
|
|
@{HOME}/.Xauthority r,
|
|
owner @{PROC}/@{pid}/mounts r,
|
|
|
|
include if exists <local/dpkg-preconfigure>
|
|
}
|
|
|
|
# vim:syntax=apparmor
|