diff --git a/apparmor.d/groups/systemd/systemd-cryptsetup b/apparmor.d/groups/systemd/systemd-cryptsetup new file mode 100644 index 000000000..cde503dd7 --- /dev/null +++ b/apparmor.d/groups/systemd/systemd-cryptsetup @@ -0,0 +1,36 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2022 Alexandre Pujol +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = /{usr/,}lib/systemd/systemd-cryptsetup +profile systemd-cryptsetup @{exec_path} { + include + include + include + include + + capability ipc_lock, + capability net_admin, + capability sys_admin, + + @{exec_path} mr, + + /etc/fstab r, + + @{run}/ r, + @{run}/cryptsetup/ r, + @{run}/cryptsetup/* rwk, + @{run}/systemd/ask-password/* rw, + + @{sys}/devices/virtual/bdi/*/read_ahead_kb r, + @{sys}/fs/ r, + + @{PROC}/devices r, + owner @{PROC}/@{pid}/mountinfo r, + + include if exists +} \ No newline at end of file diff --git a/dists/flags/main.flags b/dists/flags/main.flags index 337b28a25..ac7f578d1 100644 --- a/dists/flags/main.flags +++ b/dists/flags/main.flags @@ -210,6 +210,7 @@ systemd-cat complain systemd-cgls complain systemd-cgtop complain systemd-coredump attach_disconnected,complain +systemd-cryptsetup complain systemd-dissect complain systemd-environment-d-generator complain systemd-escape complain