diff options
author | Michal Privoznik <mprivozn@redhat.com> | 2022-12-02 15:59:28 +0100 |
---|---|---|
committer | Michal Privoznik <mprivozn@redhat.com> | 2022-12-05 10:40:52 +0100 |
commit | f3259f82fd53a499c24dce69b469ff8769c72909 (patch) | |
tree | 2b45a45060f9fa8b7dde4db7c1bcbc2f8f51a337 /src/security/security_driver.h | |
parent | 26cceb2a2ae33e09a12b75ce31bbf040ef56c432 (diff) | |
download | libvirt-f3259f82fd53a499c24dce69b469ff8769c72909.tar.gz |
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>
Diffstat (limited to 'src/security/security_driver.h')
-rw-r--r-- | src/security/security_driver.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/security/security_driver.h b/src/security/security_driver.h index a1fc23be38..fe6982ceca 100644 --- a/src/security/security_driver.h +++ b/src/security/security_driver.h @@ -154,9 +154,11 @@ typedef int (*virSecurityDomainRestoreChardevLabel) (virSecurityManager *mgr, virDomainChrSourceDef *dev_source, bool chardevStdioLogd); typedef int (*virSecurityDomainSetTPMLabels) (virSecurityManager *mgr, - virDomainDef *def); + virDomainDef *def, + bool setTPMStateLabel); typedef int (*virSecurityDomainRestoreTPMLabels) (virSecurityManager *mgr, - virDomainDef *def); + virDomainDef *def, + bool restoreTPMStateLabel); typedef int (*virSecurityDomainSetNetdevLabel) (virSecurityManager *mgr, virDomainDef *def, virDomainNetDef *net); |