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 +}