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
|
|
|
|
|
|
|
@{BUILD_DIR} = /media/debuilder/
|
|
|
|
|
|
|
|
@{exec_path} = /{usr/,}lib/apt/methods/cdrom
|
|
|
|
profile apt-methods-cdrom @{exec_path} {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/consoles>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
# The "_apt" user is created by the postinst script of the "apt" package. It's the owner of the
|
|
|
|
# dirs "/var/cache/apt/archives/partial/" and "/var/lib/apt/lists/partial/" . The "_apt" user is
|
|
|
|
# used by APT to download packages, package list, and other things using APT methods as an
|
|
|
|
# unprivileged user/group (_apt/nogroup).
|
|
|
|
capability setgid,
|
|
|
|
capability setuid,
|
|
|
|
|
|
|
|
signal (receive) peer=apt,
|
|
|
|
signal (receive) peer=apt-get,
|
|
|
|
signal (receive) peer=aptitude,
|
|
|
|
signal (receive) peer=synaptic,
|
|
|
|
|
|
|
|
@{exec_path} mr,
|
|
|
|
|
|
|
|
/var/lib/apt/lists/{,**} r,
|
|
|
|
owner /var/lib/apt/lists/* rw,
|
|
|
|
owner /var/lib/apt/lists/partial/* rw,
|
|
|
|
|
2020-12-09 10:30:52 +01:00
|
|
|
# For shell pwd
|
|
|
|
/ r,
|
|
|
|
/etc/ r,
|
|
|
|
/root/ r,
|
|
|
|
|
2020-09-12 17:19:23 +02:00
|
|
|
# For package building
|
|
|
|
@{BUILD_DIR}/** rwkl -> @{BUILD_DIR}/**,
|
|
|
|
|
|
|
|
# file_inherit
|
|
|
|
owner /dev/tty[0-9]* rw,
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include if exists <local/apt-methods-cdrom>
|
2020-09-12 17:19:23 +02:00
|
|
|
}
|