apparmor.d/apparmor.d/profiles-s-z/swtpm_setup
2022-05-07 11:42:18 +01:00

31 lines
No EOL
713 B
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2022 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}bin/swtpm_setup
profile swtpm_setup @{exec_path} {
include <abstractions/base>
include <abstractions/nameservice-strict>
@{exec_path} mr,
/{usr/,}bin/swtpm rPx,
/{usr/,}bin/swtpm_localca rPx,
/etc/swtpm_setup.conf r,
/var/log/swtpm/{,**} w,
/var/lib/libvirt/swtpm/@{uuid}/tpm2/ r,
owner /tmp/swtpm_setup.certs.*/ w,
owner /tmp/swtpm_setup.certs.*/*.cert rw,
owner /tmp/.swtpm_setup.pidfile* rw,
@{run}/systemd/userdb/ r,
include if exists <local/swtpm_setup>
}