2020-09-12 17:19:23 +02:00
|
|
|
# vim:syntax=apparmor
|
|
|
|
# ------------------------------------------------------------------
|
|
|
|
#
|
2021-01-10 16:35:07 +01:00
|
|
|
# Copyright (C) 2020-2021 Mikhail Morfikov
|
2020-09-12 17:19:23 +02:00
|
|
|
#
|
|
|
|
# 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/,}bin/systemd-analyze
|
|
|
|
profile systemd-analyze @{exec_path} {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/systemd-common>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
# Needed for the prctl's PR_SET_MM option:
|
|
|
|
# prctl(PR_SET_MM, PR_SET_MM_ARG_START, 0x721691edc000, 0, 0) = -1 EPERM (Operation not permitted)
|
|
|
|
capability sys_resource,
|
|
|
|
|
|
|
|
signal (send) peer=child-pager,
|
|
|
|
|
|
|
|
@{exec_path} mr,
|
|
|
|
|
|
|
|
/{usr/,}bin/pager rPx -> child-pager,
|
|
|
|
/{usr/,}bin/less rPx -> child-pager,
|
|
|
|
/{usr/,}bin/more rPx -> child-pager,
|
|
|
|
/{usr/,}bin/man rPx,
|
|
|
|
|
|
|
|
owner @{PROC}/@{pid}/cgroup r,
|
|
|
|
owner @{PROC}/@{pid}/mountinfo r,
|
|
|
|
owner @{PROC}/@{pid}/comm r,
|
|
|
|
@{PROC}/swaps r,
|
|
|
|
|
|
|
|
# For systemd-analyze cat-config
|
|
|
|
/etc/systemd/** r,
|
|
|
|
/{usr/,}lib/systemd/** r,
|
|
|
|
|
2021-03-13 09:47:36 +01:00
|
|
|
@{sys}/fs/cgroup/{,**} r,
|
2020-09-12 17:19:23 +02:00
|
|
|
@{sys}/fs/cgroup/{systemd,unified}/**/cgroup.procs rw,
|
|
|
|
@{sys}/firmware/acpi/tables/FPDT r,
|
|
|
|
|
|
|
|
@{sys}/module/**/uevent r,
|
|
|
|
@{sys}/devices/**/uevent r,
|
2020-10-25 10:23:34 +01:00
|
|
|
@{run}/udev/data/* r,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2020-10-25 10:23:34 +01:00
|
|
|
@{run}/udev/tags/systemd/ r,
|
|
|
|
@{run}/systemd/system/ r,
|
|
|
|
@{run}/systemd/userdb/io.systemd.DynamicUser w,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
owner /tmp/systemd-temporary-*/ rw,
|
|
|
|
|
|
|
|
/usr/ r,
|
|
|
|
|
|
|
|
/etc/default/locale r,
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include if exists <local/systemd-analyze>
|
2020-09-12 17:19:23 +02:00
|
|
|
}
|