From 2ffa1faa23a17aec454ab385d9a3b63b2de347bb Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Thu, 7 Apr 2022 21:18:55 +0100 Subject: [PATCH] feat: add initial version of login. --- apparmor.d/profiles-g-l/login | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 apparmor.d/profiles-g-l/login diff --git a/apparmor.d/profiles-g-l/login b/apparmor.d/profiles-g-l/login new file mode 100644 index 000000000..36bae0f8a --- /dev/null +++ b/apparmor.d/profiles-g-l/login @@ -0,0 +1,37 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2022 Alexandre Pujol +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = /{usr/,}bin/login +profile login @{exec_path} { + include + include + include + include + include + + capability chown, + capability fsetid, + capability setgid, + capability setuid, + + @{exec_path} mr, + + /{usr/,}bin/{,z,ba,da}sh rUx, + + /etc/environment r, + + /var/log/btmp{,.[0-9]*} r, + + @{run}/faillock/root rwk, + @{run}/systemd/userdb/ r, + + @{PROC}/@{pid}/loginuid rw, + @{PROC}/@{pid}/uid_map r, + + include if exists +} \ No newline at end of file