feat(profile): systemd: add nsresourced.
This commit is contained in:
parent
f936088ae7
commit
4e21ef53e6
5 changed files with 85 additions and 1 deletions
|
|
@ -8,7 +8,7 @@ abi <abi/4.0>,
|
|||
include <tunables/global>
|
||||
|
||||
@{exec_path} = @{lib}/systemd/systemd-fsckd
|
||||
profile systemd-fsckd @{exec_path} {
|
||||
profile systemd-fsckd @{exec_path} flags=(attach_disconnected) {
|
||||
include <abstractions/base>
|
||||
include <abstractions/consoles>
|
||||
include <abstractions/common/systemd>
|
||||
|
|
|
|||
38
apparmor.d/groups/systemd/systemd-nsresourced
Normal file
38
apparmor.d/groups/systemd/systemd-nsresourced
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# 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/systemd-nsresourced
|
||||
profile systemd-nsresourced @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/common/systemd>
|
||||
|
||||
capability bpf,
|
||||
capability perfmon,
|
||||
capability sys_resource,
|
||||
|
||||
signal receive set=usr2 peer=systemd-nsresourced//&systemd-nsresourcework,
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
@{lib}/systemd/systemd-nsresourcework Px -> systemd-nsresourced//&systemd-nsresourcework,
|
||||
|
||||
@{run}/systemd/nsresource/ rw,
|
||||
@{run}/systemd/nsresource/** rw,
|
||||
|
||||
@{sys}/devices/kprobe/type r,
|
||||
@{sys}/fs/bpf/ r,
|
||||
@{sys}/fs/bpf/systemd/ rw,
|
||||
@{sys}/fs/bpf/systemd/userns-restrict/{,**} rw,
|
||||
@{sys}/fs/cgroup/system.slice/systemd-nsresourced.service/memory.pressure rw,
|
||||
@{sys}/kernel/btf/vmlinux r,
|
||||
@{sys}/kernel/security/lsm r,
|
||||
|
||||
include if exists <local/systemd-nsresourced>
|
||||
}
|
||||
|
||||
# vim:syntax=apparmor
|
||||
22
apparmor.d/groups/systemd/systemd-nsresourcework
Normal file
22
apparmor.d/groups/systemd/systemd-nsresourcework
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# 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/systemd-nsresourcework
|
||||
profile systemd-nsresourcework @{exec_path} {
|
||||
include <abstractions/base>
|
||||
|
||||
capability sys_resource,
|
||||
|
||||
signal send set=usr2 peer=systemd-nsresourced,
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
include if exists <local/systemd-nsresourcework>
|
||||
}
|
||||
|
||||
# vim:syntax=apparmor
|
||||
22
apparmor.d/groups/systemd/systemd-stdio-bridge
Normal file
22
apparmor.d/groups/systemd/systemd-stdio-bridge
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# 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} = @{bin}/systemd-stdio-bridge
|
||||
profile systemd-stdio-bridge @{exec_path} flags=(attach_disconnected) {
|
||||
include <abstractions/base>
|
||||
include <abstractions/common/systemd>
|
||||
include <abstractions/consoles>
|
||||
|
||||
signal send set=term peer=@{p_systemd},
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
include if exists <local/systemd-stdio-bridge>
|
||||
}
|
||||
|
||||
# vim:syntax=apparmor
|
||||
|
|
@ -346,6 +346,8 @@ systemd-inhibit attach_disconnected,complain
|
|||
systemd-journald attach_disconnected,mediate_deleted
|
||||
systemd-mount complain
|
||||
systemd-network-generator complain
|
||||
systemd-nsresourced complain
|
||||
systemd-nsresourcework complain
|
||||
systemd-portabled complain
|
||||
systemd-remount-fs complain
|
||||
systemd-resolve complain
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue