mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-11-14 23:43:56 +01:00
feat(profiles): add swtpm, swtpm_localca and swtpm_setup.
This commit is contained in:
parent
3018ce3bbd
commit
82e53fd919
26
apparmor.d/profiles-s-z/swtpm
Normal file
26
apparmor.d/profiles-s-z/swtpm
Normal file
@ -0,0 +1,26 @@
|
||||
# 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
|
||||
profile swtpm @{exec_path} {
|
||||
include <abstractions/base>
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
/var/lib/libvirt/swtpm/@{uuid}/tpm2/.lock wk,
|
||||
/var/lib/libvirt/swtpm/@{uuid}/tpm2/*.permall rw,
|
||||
|
||||
/var/log/swtpm/libvirt/qemu/*-swtpm.log w,
|
||||
|
||||
/tmp/.swtpm_setup.pidfile.* rw,
|
||||
|
||||
@{run}/libvirt/qemu/swtpm/*.sock w,
|
||||
@{run}/libvirt/qemu/swtpm/*.pid w,
|
||||
|
||||
include if exists <local/swtpm>
|
||||
}
|
33
apparmor.d/profiles-s-z/swtpm_localca
Normal file
33
apparmor.d/profiles-s-z/swtpm_localca
Normal file
@ -0,0 +1,33 @@
|
||||
# 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_localca
|
||||
profile swtpm_localca @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/nameservice-strict>
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
/{usr/,}bin/certtool rix,
|
||||
/{usr/,}bin/swtpm_cert rix,
|
||||
|
||||
/etc/swtpm-localca.conf r,
|
||||
/etc/swtpm-localca.options r,
|
||||
|
||||
/var/log/swtpm/libvirt/qemu/*-swtpm.log w,
|
||||
|
||||
/var/lib/swtpm-localca/*.pem r,
|
||||
/var/lib/swtpm-localca/.lock.swtpm-localca rwk,
|
||||
/var/lib/swtpm-localca/certserial rw,
|
||||
|
||||
/tmp/swtpm_setup.certs.*/*.cert rw,
|
||||
|
||||
@{run}/libvirt/qemu/swtpm/*.sock w,
|
||||
|
||||
include if exists <local/swtpm_localca>
|
||||
}
|
30
apparmor.d/profiles-s-z/swtpm_setup
Normal file
30
apparmor.d/profiles-s-z/swtpm_setup
Normal file
@ -0,0 +1,30 @@
|
||||
# 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.pidfile* rw,
|
||||
|
||||
@{run}/systemd/userdb/ r,
|
||||
|
||||
include if exists <local/swtpm_setup>
|
||||
}
|
@ -86,6 +86,10 @@ ssh complain
|
||||
sshd attach_disconnected,complain
|
||||
su complain
|
||||
sudo complain
|
||||
swtpm complain
|
||||
swtpm_ioctl complain
|
||||
swtpm_localca complain
|
||||
swtpm_setup complain
|
||||
sysctl complain
|
||||
systemd-analyze complain
|
||||
systemd-ask-password complain
|
||||
|
Loading…
Reference in New Issue
Block a user