feat(profile): systemd: add some generators

This commit is contained in:
Alexandre Pujol 2025-05-04 20:05:54 +02:00
parent 4e21ef53e6
commit 3e0c3067d8
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
6 changed files with 135 additions and 0 deletions

View file

@ -0,0 +1,28 @@
# 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} = @{lib}/systemd/system-generators/systemd-rc-local-generator
profile systemd-generator-rc-local @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
ptrace read peer=@{p_systemd},
@{exec_path} mr,
@{PROC}/@{pid}/cgroup r,
@{PROC}/1/cgroup r,
@{PROC}/1/environ r,
@{PROC}/cmdline r,
@{PROC}/sys/kernel/osrelease r,
/dev/kmsg w,
include if exists <local/systemd-generator-rc-local>
}
# vim:syntax=apparmor