diff --git a/apparmor.d/profiles-g-l/login b/apparmor.d/profiles-g-l/login new file mode 100644 index 00000000..36bae0f8 --- /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