From 53682c678d5c95d2600baca5680b0a68a02868c1 Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Thu, 7 Apr 2022 21:00:39 +0100 Subject: [PATCH] feat: add sulogin profile. --- apparmor.d/profiles-s-z/sulogin | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 apparmor.d/profiles-s-z/sulogin diff --git a/apparmor.d/profiles-s-z/sulogin b/apparmor.d/profiles-s-z/sulogin new file mode 100644 index 00000000..05319928 --- /dev/null +++ b/apparmor.d/profiles-s-z/sulogin @@ -0,0 +1,26 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2022 Alexandre Pujol +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = /{usr/,}{s,}bin/sulogin +profile sulogin @{exec_path} { + include + include + + capability sys_admin, + + @{exec_path} mr, + + /etc/shadow r, + + /dev/ r, + /dev/tty[0-9]* rw, + + @{PROC}/consoles r, + + include if exists +} \ No newline at end of file