2020-09-12 17:19:23 +02:00
|
|
|
# vim:syntax=apparmor
|
|
|
|
# ------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Copyright (C) 2019-2020 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-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/share/debconf/frontend
|
|
|
|
profile frontend @{exec_path} flags=(complain) {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/consoles>
|
|
|
|
include <abstractions/perl>
|
|
|
|
include <abstractions/nameservice-strict>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
#capability sys_tty_config,
|
|
|
|
|
|
|
|
@{exec_path} r,
|
|
|
|
/{usr/,}bin/perl r,
|
|
|
|
|
2020-12-09 10:30:52 +01:00
|
|
|
/{usr/,}bin/{,ba,da}sh rix,
|
|
|
|
/{usr/,}bin/stty rix,
|
|
|
|
/{usr/,}bin/locale rix,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
# debconf apps
|
|
|
|
/{usr/,}bin/adequate rPx,
|
|
|
|
/{usr/,}bin/debconf-apt-progress rPx,
|
|
|
|
/{usr/,}lib/tasksel/tasksel-debconf rPx -> tasksel,
|
|
|
|
/{usr/,}bin/linux-check-removal rPx,
|
|
|
|
/{usr/,}bin/ucf rPx,
|
|
|
|
/{usr/,}sbin/pam-auth-update rPx,
|
|
|
|
/usr/share/debian-security-support/check-support-status.hook rPx,
|
|
|
|
|
|
|
|
# Run the package maintainer's scripts
|
|
|
|
# What to do with it? Maintainer scripts can use lots of tools. (#FIXME#)
|
|
|
|
#/var/lib/dpkg/info/*.{config,templates} rPUx,
|
|
|
|
#/var/lib/dpkg/info/*.{preinst,postinst} rPUx,
|
|
|
|
#/var/lib/dpkg/info/*.{prerm,postrm} rPUx,
|
|
|
|
/var/lib/dpkg/info/*.control r,
|
|
|
|
#/var/lib/dpkg/tmp.ci/{config,templates} rPUx,
|
|
|
|
#/var/lib/dpkg/tmp.ci/{preinst,postinst} rPUx,
|
|
|
|
#/var/lib/dpkg/tmp.ci/{prerm,postrm} rPUx,
|
|
|
|
/var/lib/dpkg/tmp.ci/control r,
|
|
|
|
/var/lib/dpkg/info/*.{config,templates} rCx -> scripts,
|
|
|
|
/var/lib/dpkg/info/*.{preinst,postinst} rCx -> scripts,
|
|
|
|
/var/lib/dpkg/info/*.{prerm,postrm} rCx -> scripts,
|
|
|
|
/var/lib/dpkg/tmp.ci/{config,templates} rCx -> scripts,
|
|
|
|
/var/lib/dpkg/tmp.ci/{preinst,postinst} rCx -> scripts,
|
|
|
|
/var/lib/dpkg/tmp.ci/{prerm,postrm} rCx -> scripts,
|
|
|
|
|
|
|
|
# DKMS scipts
|
|
|
|
# What to do with it? (#FIXME#)
|
|
|
|
/{usr/,}lib/dkms/common.postinst rPUx,
|
|
|
|
/{usr/,}lib/dkms/dkms-* rPUx,
|
|
|
|
/{usr/,}lib/dkms/dkms_* rPUx,
|
|
|
|
|
|
|
|
/etc/debconf.conf r,
|
|
|
|
/usr/share/debconf/{,**} r,
|
|
|
|
owner /var/cache/debconf/* rwk,
|
|
|
|
|
|
|
|
/etc/inputrc r,
|
|
|
|
|
|
|
|
/etc/shadow r,
|
|
|
|
|
|
|
|
# The following is needed when debconf uses 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,
|
|
|
|
/{usr/,}bin/hostname rPx,
|
|
|
|
owner @{PROC}/@{pid}/mounts r,
|
|
|
|
@{HOME}/.Xauthority r,
|
|
|
|
|
|
|
|
# The following is needed when debconf uses dialog/whiptail frontend.
|
|
|
|
/{usr/,}bin/whiptail rPx,
|
|
|
|
owner /tmp/file* w,
|
|
|
|
|
|
|
|
|
|
|
|
profile scripts flags=(complain) {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/consoles>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
# What's this for? (#FIXME#)
|
|
|
|
capability dac_read_search,
|
|
|
|
|
|
|
|
/var/lib/dpkg/info/*.config r,
|
|
|
|
/var/lib/dpkg/info/*.{preinst,postinst} r,
|
|
|
|
/var/lib/dpkg/info/*.{prerm,postrm} r,
|
|
|
|
/var/lib/dpkg/tmp.ci/config r,
|
|
|
|
/var/lib/dpkg/tmp.ci/{preinst,postinst} r,
|
|
|
|
/var/lib/dpkg/tmp.ci/{prerm,postrm} r,
|
|
|
|
|
|
|
|
/ r,
|
|
|
|
|
|
|
|
/{usr/,}bin/ r,
|
|
|
|
/{usr/,}bin/* rPUx,
|
|
|
|
|
|
|
|
/{usr/,}sbin/ r,
|
|
|
|
/{usr/,}sbin/* rPUx,
|
|
|
|
|
|
|
|
/{usr/,}lib/ r,
|
|
|
|
/{usr/,}lib/** rPUx,
|
|
|
|
|
|
|
|
/usr/share/** r,
|
|
|
|
/usr/share/** rPUx,
|
|
|
|
|
2020-12-09 10:30:52 +01:00
|
|
|
/etc/ r,
|
2020-09-12 17:19:23 +02:00
|
|
|
/etc/** rw,
|
2020-12-09 10:30:52 +01:00
|
|
|
/var/ r,
|
|
|
|
/var/** rw,
|
|
|
|
@{sys}/ r,
|
|
|
|
@{sys}/**/ r,
|
|
|
|
@{run}/ r,
|
|
|
|
@{run}/** r,
|
|
|
|
/tmp/ r,
|
2020-09-12 17:19:23 +02:00
|
|
|
owner /tmp/** rw,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include if exists <local/frontend>
|
2020-09-12 17:19:23 +02:00
|
|
|
}
|