提交 8c625794 编写于 作者: M Michal Privoznik

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: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NErik Skultety <eskultet@redhat.com>
上级 4c3e83cc
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册