From 711c7d917c05dd2ca805e93331d3c648ea65fd83 Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Thu, 7 Apr 2022 20:57:32 +0100 Subject: [PATCH] feat: add agetty profile. --- apparmor.d/profiles-a-f/agetty | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 apparmor.d/profiles-a-f/agetty diff --git a/apparmor.d/profiles-a-f/agetty b/apparmor.d/profiles-a-f/agetty new file mode 100644 index 00000000..28b8cc52 --- /dev/null +++ b/apparmor.d/profiles-a-f/agetty @@ -0,0 +1,31 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2021 Alexandre Pujol +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = /{usr/,}sbin/agetty +profile agetty @{exec_path} { + include + include + include + + capability fsetid, + capability sys_admin, + capability sys_tty_config, + + @{exec_path} mr, + + /{usr/,}bin/login rPx, + + /etc/issue r, + + owner @{run}/agetty.reload rw, + @{run}/resolvconf/resolv.conf r, + + /dev/tty[0-9]* rw, + + include if exists +}