diff --git a/apparmor.d/groups/systemd/systemd-vconsole-setup b/apparmor.d/groups/systemd/systemd-vconsole-setup new file mode 100644 index 00000000..a74fc276 --- /dev/null +++ b/apparmor.d/groups/systemd/systemd-vconsole-setup @@ -0,0 +1,34 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2021 Alexandre Pujol +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = /{usr/,}lib/systemd/systemd-vconsole-setup +profile systemd-vconsole-setup @{exec_path} { + include + include + include + + capability sys_ptrace, + capability sys_resource, + capability sys_tty_config, + + @{exec_path} mr, + + /{usr/,}bin/loadkeys rix, + + / r, + + /usr/share/kbd/keymaps/{,**} r, + + /etc/vconsole.conf r, + + @{sys}/module/vt/parameters/default_utf8 w, + + /dev/tty[0-9]* rw, + + include if exists +} \ No newline at end of file