From 0d5d65b0af6acfdd0f8e4c36ecb832bd6f5501de Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Thu, 7 Oct 2021 15:01:13 +0100 Subject: [PATCH] Add systemd-update-utmp. --- apparmor.d/groups/systemd/systemd-update-utmp | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 apparmor.d/groups/systemd/systemd-update-utmp diff --git a/apparmor.d/groups/systemd/systemd-update-utmp b/apparmor.d/groups/systemd/systemd-update-utmp new file mode 100644 index 00000000..4a9c63be --- /dev/null +++ b/apparmor.d/groups/systemd/systemd-update-utmp @@ -0,0 +1,30 @@ +# 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-update-utmp +profile systemd-update-utmp @{exec_path} { + include + + capability audit_write, + capability net_admin, + + network netlink raw, + + ptrace (read) peer=unconfined, + + @{exec_path} mr, + + owner /var/log/wtmp rwk, + owner @{run}/utmp rwk, + + @{PROC}/1/environ r, + @{PROC}/cmdline r, + @{PROC}/sys/kernel/osrelease r, + + include if exists +} \ No newline at end of file