]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Handle SecurityManagerVerify in post parse
authorCole Robinson <crobinso@redhat.com>
Thu, 7 Jan 2016 01:43:15 +0000 (20:43 -0500)
committerCole Robinson <crobinso@redhat.com>
Fri, 8 Jan 2016 18:25:21 +0000 (13:25 -0500)
Rather than open coding calls. I can't see any reason not to

src/qemu/qemu_domain.c
src/qemu/qemu_driver.c

index c14ff4561a6bff0c501599172a46c19a122d5b48..00c780d8414ba62c6dbeca13da850185d32ac74d 100644 (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);
index 114627e6ff86b1c6810a32c7fd501529fb343618..e2134ee36bbc042a164949da7df97caa4f028947 100644 (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;