]> git.ipfire.org Git - thirdparty/libvirt.git/commit
security: Extend TPM label APIs
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 2 Dec 2022 14:59:28 +0000 (15:59 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 5 Dec 2022 09:40:52 +0000 (10:40 +0100)
commitf3259f82fd53a499c24dce69b469ff8769c72909
tree2b45a45060f9fa8b7dde4db7c1bcbc2f8f51a337
parent26cceb2a2ae33e09a12b75ce31bbf040ef56c432
security: Extend TPM label APIs

The virSecurityDomainSetTPMLabels() and
virSecurityDomainRestoreTPMLabels() APIs set/restore label on two
files/directories:

  1) the TPM state (tpm->data.emulator.storagepath), and
  2) the TPM log file (tpm->data.emulator.logfile).

Soon there will be a need to set the label on the log file but
not on the state. Therefore, extend these APIs for a boolean flag
that when set does both, but when unset does only 2).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_security.c
src/security/security_driver.h
src/security/security_manager.c
src/security/security_manager.h
src/security/security_selinux.c
src/security/security_stack.c