mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
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>
This commit is contained in:
parent
4c3e83ccfb
commit
8c62579424
@ -4064,7 +4064,7 @@ qemuDomainScreenshot(virDomainPtr dom,
|
||||
}
|
||||
unlink_tmp = true;
|
||||
|
||||
qemuSecuritySetSavedStateLabel(driver, vm, tmp);
|
||||
qemuSecurityDomainSetPathLabel(driver, vm, tmp, false);
|
||||
|
||||
qemuDomainObjEnterMonitor(driver, vm);
|
||||
if (qemuMonitorScreendump(priv->mon, videoAlias, screen, tmp) < 0) {
|
||||
@ -11671,7 +11671,7 @@ qemuDomainMemoryPeek(virDomainPtr dom,
|
||||
goto endjob;
|
||||
}
|
||||
|
||||
qemuSecuritySetSavedStateLabel(driver, vm, tmp);
|
||||
qemuSecurityDomainSetPathLabel(driver, vm, tmp, false);
|
||||
|
||||
priv = vm->privateData;
|
||||
qemuDomainObjEnterMonitor(driver, vm);
|
||||
|
Loading…
Reference in New Issue
Block a user