Add systemd-cg* profiles

This commit is contained in:
Alexandre Pujol 2021-09-15 20:41:44 +01:00
parent 79ab7e3eec
commit d90aecaa40
Failed to generate hash of commit
3 changed files with 54 additions and 0 deletions

View file

@ -0,0 +1,28 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}bin/systemd-cgls
profile systemd-cgls @{exec_path} {
include <abstractions/base>
ptrace (read),
@{exec_path} mr,
/{usr/,}bin/pager rPx -> child-pager,
/{usr/,}bin/less rPx -> child-pager,
/{usr/,}bin/more rPx -> child-pager,
@{sys}/fs/cgroup/{,**} r,
@{PROC}/@{pids}/cgroup r,
@{PROC}/@{pids}/cmdline r,
@{PROC}/@{pids}/stat r,
include if exists <local/systemd-cgls>
}

View file

@ -0,0 +1,24 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}bin/systemd-cgtop
profile systemd-cgtop @{exec_path} {
include <abstractions/base>
@{exec_path} mr,
/{usr/,}bin/pager rPx -> child-pager,
/{usr/,}bin/less rPx -> child-pager,
/{usr/,}bin/more rPx -> child-pager,
@{sys}/fs/cgroup/{,**} r,
@{PROC}/loadavg r,
include if exists <local/systemd-cgtop>
}

View file

@ -125,6 +125,8 @@ swapon complain
systemd-analyze complain systemd-analyze complain
systemd-ask-password complain systemd-ask-password complain
systemd-binfmt complain systemd-binfmt complain
systemd-cgls complain
systemd-cgtop complain
systemd-environment-d-generator complain systemd-environment-d-generator complain
systemd-escape complain systemd-escape complain
systemd-homed complain systemd-homed complain