From b16d172e2210909291e73ccd01ae6cef5e1dc2bc Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Sat, 4 Feb 2023 23:56:10 +0000 Subject: [PATCH] feat(systemd): add systemd-cat & systemd-inhibit --- apparmor.d/groups/systemd/systemd-cat | 20 ++++++++++++++++++++ apparmor.d/groups/systemd/systemd-inhibit | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 apparmor.d/groups/systemd/systemd-cat create mode 100644 apparmor.d/groups/systemd/systemd-inhibit diff --git a/apparmor.d/groups/systemd/systemd-cat b/apparmor.d/groups/systemd/systemd-cat new file mode 100644 index 00000000..b66f8a79 --- /dev/null +++ b/apparmor.d/groups/systemd/systemd-cat @@ -0,0 +1,20 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2021 Alexandre Pujol +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = /{usr/,}bin/systemd-cat +profile systemd-cat @{exec_path} { + include + + capability net_admin, + + @{exec_path} mr, + + /{usr/,}bin/cat rix, + + include if exists +} diff --git a/apparmor.d/groups/systemd/systemd-inhibit b/apparmor.d/groups/systemd/systemd-inhibit new file mode 100644 index 00000000..a6c784df --- /dev/null +++ b/apparmor.d/groups/systemd/systemd-inhibit @@ -0,0 +1,20 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2021 Alexandre Pujol +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = /{usr/,}bin/systemd-inhibit +profile systemd-inhibit @{exec_path} flags=(attach_disconnected) { + include + + capability net_admin, + + @{exec_path} mr, + + /{usr/,}bin/cat rix, + + include if exists +}