]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Use qemuSecurityDomainSetPathLabel() to set seclabes on not saved state files
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 17 Jun 2020 09:01:05 +0000 (11:01 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 18 Jun 2020 11:45:08 +0000 (13:45 +0200)
commit8c6257942425c36e6f6d96629d334fb09a94da28
tree26d0897d52684b68edd2699561721886b4b10344
parent4c3e83ccfb4563c8c5df6005b5511f73315b3810
qemu: Use qemuSecurityDomainSetPathLabel() to set seclabes on not saved state files

There are two places within qemu driver that misuse
qemuSecuritySetSavedStateLabel() to set seclabels on tempfiles
that are not state files: qemuDomainScreenshot() and
qemuDomainMemoryPeek(). They are doing so because of lack of
qemuSecurityDomainSetPathLabel() at the time of their
introduction.

In all three secdrivers (well, four if you count NOP driver) the
implementation of .domainSetSavedStateLabel and
.domainSetPathLabel callbacks is the same anyway.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
src/qemu/qemu_driver.c