From 2fc59385a6599c321292fd3321cc9b8c16504cc4 Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Fri, 22 Oct 2021 14:54:40 +0100 Subject: [PATCH] Add initial systemd-oomd. --- apparmor.d/groups/systemd/systemd-oomd | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 apparmor.d/groups/systemd/systemd-oomd diff --git a/apparmor.d/groups/systemd/systemd-oomd b/apparmor.d/groups/systemd/systemd-oomd new file mode 100644 index 00000000..4fdd147a --- /dev/null +++ b/apparmor.d/groups/systemd/systemd-oomd @@ -0,0 +1,27 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2021 Alexandre Pujol +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = /{usr/,}lib/systemd/systemd-oomd +profile systemd-oomd @{exec_path} { + include + + capability dac_override, + capability kill, + + @{exec_path} mr, + + /etc/systemd/oomd.conf r, + + @{PROC}/1/cgroup r, + @{PROC}/cmdline r, + @{PROC}/pressure/{cpu,io,memory} r, + @{PROC}/sys/kernel/osrelease r, + @{PROC}/sys/kernel/random/boot_id r, + + include if exists +} \ No newline at end of file