mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
security: AppArmor profile fixes for swtpm
The AppArmor profile generated by virt-aa-helper is too strict for swtpm. This change contains 2 small fixes: - Relax append access to swtpm's log file to permit write access instead. Append access is insufficient because the log is opened with O_CREAT. - Permit swtpm to acquire a lock on its lock file. Signed-off-by: Chris Coulson <chris.coulson@canonical.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
6ffb8fff9e
commit
d660dd95ea
@ -1238,10 +1238,10 @@ get_files(vahControl * ctl)
|
||||
* directory, log, and PID files.
|
||||
*/
|
||||
virBufferAsprintf(&buf,
|
||||
" \"%s/lib/libvirt/swtpm/%s/%s/**\" rw,\n",
|
||||
" \"%s/lib/libvirt/swtpm/%s/%s/**\" rwk,\n",
|
||||
LOCALSTATEDIR, uuidstr, tpmpath);
|
||||
virBufferAsprintf(&buf,
|
||||
" \"%s/log/swtpm/libvirt/qemu/%s-swtpm.log\" a,\n",
|
||||
" \"%s/log/swtpm/libvirt/qemu/%s-swtpm.log\" w,\n",
|
||||
LOCALSTATEDIR, ctl->def->name);
|
||||
virBufferAsprintf(&buf,
|
||||
" \"%s/libvirt/qemu/swtpm/%s-swtpm.pid\" rw,\n",
|
||||
|
Loading…
x
Reference in New Issue
Block a user