mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
qemu: Handle SecurityManagerVerify in post parse
Rather than open coding calls. I can't see any reason not to
This commit is contained in:
parent
a8b628e7a8
commit
74abc3deac
@ -1255,6 +1255,9 @@ qemuDomainDefPostParse(virDomainDefPtr def,
|
|||||||
if (qemuCanonicalizeMachine(def, qemuCaps) < 0)
|
if (qemuCanonicalizeMachine(def, qemuCaps) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
if (virSecurityManagerVerify(driver->securityManager, def) < 0)
|
||||||
|
goto cleanup;
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnref(qemuCaps);
|
virObjectUnref(qemuCaps);
|
||||||
|
@ -1723,9 +1723,6 @@ static virDomainPtr qemuDomainCreateXML(virConnectPtr conn,
|
|||||||
if (virDomainCreateXMLEnsureACL(conn, def) < 0)
|
if (virDomainCreateXMLEnsureACL(conn, def) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virSecurityManagerVerify(driver->securityManager, def) < 0)
|
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
if (!(qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, def->emulator)))
|
if (!(qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, def->emulator)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -7502,9 +7499,6 @@ static virDomainPtr qemuDomainDefineXMLFlags(virConnectPtr conn, const char *xml
|
|||||||
if (virDomainDefineXMLFlagsEnsureACL(conn, def) < 0)
|
if (virDomainDefineXMLFlagsEnsureACL(conn, def) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virSecurityManagerVerify(driver->securityManager, def) < 0)
|
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
if (!(qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, def->emulator)))
|
if (!(qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, def->emulator)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user