64 lines
1.6 KiB
Text
64 lines
1.6 KiB
Text
# apparmor.d - Full set of apparmor profiles
|
|
# Copyright (C) 2025 Alexandre Pujol <alexandre@pujol.io>
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
abi <abi/4.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
@{exec_path} = /var/lib/dpkg/info/systemd*
|
|
profile dpkg-script-systemd @{exec_path} {
|
|
include <abstractions/base>
|
|
include <abstractions/consoles>
|
|
|
|
@{exec_path} mrix,
|
|
|
|
@{sh_path} rix,
|
|
|
|
@{bin}/deb-systemd-helper Px,
|
|
@{bin}/deb-systemd-invoke Px,
|
|
@{bin}/dpkg Cx -> dpkg,
|
|
@{bin}/dpkg-divert Px,
|
|
@{bin}/dpkg-maintscript-helper Px,
|
|
@{bin}/journalctl Px,
|
|
@{bin}/kernel-install Px,
|
|
@{bin}/systemctl Cx -> systemctl,
|
|
@{bin}/systemd-machine-id-setup Px,
|
|
@{bin}/systemd-sysusers Px,
|
|
@{bin}/systemd-tmpfiles Px,
|
|
@{lib}/systemd/systemd-sysctl Px,
|
|
@{sbin}/pam-auth-update Px,
|
|
|
|
/etc/systemd/system/*.wants/ rw,
|
|
/etc/systemd/system/*.wants/* rw,
|
|
|
|
/var/lib/systemd/{,*} rw,
|
|
/var/log/journal/ rw,
|
|
|
|
profile dpkg {
|
|
include <abstractions/base>
|
|
include <abstractions/common/apt>
|
|
|
|
@{bin}/dpkg mr,
|
|
|
|
include if exists <local/dpkg-script-systemd_dpkg>
|
|
}
|
|
|
|
profile systemctl {
|
|
include <abstractions/base>
|
|
include <abstractions/app/systemctl>
|
|
|
|
capability net_admin,
|
|
capability sys_resource,
|
|
|
|
signal send set=(cont term) peer=systemd-tty-ask-password-agent,
|
|
|
|
@{bin}/systemd-tty-ask-password-agent Px,
|
|
|
|
include if exists <local/dpkg-script-systemd_systemctl>
|
|
}
|
|
|
|
include if exists <local/dpkg-script-systemd>
|
|
}
|
|
|
|
# vim:syntax=apparmor
|