qemu: Handle SecurityManagerVerify in post parse

Rather than open coding calls. I can't see any reason not to
This commit is contained in:
Cole Robinson 2016-01-06 20:43:15 -05:00
parent a8b628e7a8
commit 74abc3deac
2 changed files with 3 additions and 6 deletions

View File

@ -1255,6 +1255,9 @@ qemuDomainDefPostParse(virDomainDefPtr def,
if (qemuCanonicalizeMachine(def, qemuCaps) < 0)
goto cleanup;
if (virSecurityManagerVerify(driver->securityManager, def) < 0)
goto cleanup;
ret = 0;
cleanup:
virObjectUnref(qemuCaps);

View File

@ -1723,9 +1723,6 @@ static virDomainPtr qemuDomainCreateXML(virConnectPtr conn,
if (virDomainCreateXMLEnsureACL(conn, def) < 0)
goto cleanup;
if (virSecurityManagerVerify(driver->securityManager, def) < 0)
goto cleanup;
if (!(qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, def->emulator)))
goto cleanup;
@ -7502,9 +7499,6 @@ static virDomainPtr qemuDomainDefineXMLFlags(virConnectPtr conn, const char *xml
if (virDomainDefineXMLFlagsEnsureACL(conn, def) < 0)
goto cleanup;
if (virSecurityManagerVerify(driver->securityManager, def) < 0)
goto cleanup;
if (!(qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, def->emulator)))
goto cleanup;