aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Bolte <matthias.bolte@googlemail.com>2011-07-11 19:29:09 +0200
committerMatthias Bolte <matthias.bolte@googlemail.com>2011-07-11 19:38:51 +0200
commitaa14709a4771924fdd880eecba46417c61736cc8 (patch)
treeede0da4df6775d634942ce48f84b9c6429b116c0 /src/phyp/phyp_driver.c
parentremote: Fix memory leak (diff)
downloadlibvirt-aa14709a4771924fdd880eecba46417c61736cc8.tar.gz
libvirt-aa14709a4771924fdd880eecba46417c61736cc8.tar.bz2
libvirt-aa14709a4771924fdd880eecba46417c61736cc8.zip
Add domain type checking
The drivers were accepting domain configs without checking if those were actually meant for them. For example the LXC driver happily accepts configs with type QEMU. Add a check for the expected domain types to the virDomainDefParse* functions.
Diffstat (limited to 'src/phyp/phyp_driver.c')
-rw-r--r--src/phyp/phyp_driver.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index d1ab5b42b..f6f55c405 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -3611,6 +3611,7 @@ phypDomainCreateAndStart(virConnectPtr conn,
virCheckFlags(0, NULL);
if (!(def = virDomainDefParseString(phyp_driver->caps, xml,
+ 1 << VIR_DOMAIN_VIRT_PHYP,
VIR_DOMAIN_XML_SECURE)))
goto err;