# vim:syntax=apparmor
# AppArmor policy for swtpm
# Author: Lena Voytek <lena.voytek@canonical.com>
-# Last Modified: Fri Feb 18 10:23:53 2022
+# Last Modified: Tue Oct 11 10:53:05 2022
#include <tunables/global>
# Site-specific additions and overrides. See local/README for details.
#include <local/usr.bin.swtpm>
+ capability chown,
capability dac_override,
+ capability dac_read_search,
+ capability fowner,
+ capability fsetid,
+ capability setgid,
+ capability setuid,
network inet stream,
network inet6 stream,
/usr/bin/swtpm rm,
- owner /tmp/** rwk,
+ /tmp/** rwk,
+ owner @{HOME}/** rwk,
owner /var/lib/libvirt/swtpm/** rwk,
/run/libvirt/qemu/swtpm/*.sock rwk,
owner /var/log/swtpm/libvirt/qemu/*.log rwk,
owner /run/libvirt/qemu/swtpm/*.pid rwk,
owner /dev/vtpmx rw,
+ owner /etc/nsswitch.conf r,
owner /var/lib/swtpm/** rwk,
owner /run/swtpm/sock rw,
}