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 /tests/xmconfigtest.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 'tests/xmconfigtest.c')
-rw-r--r--tests/xmconfigtest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/xmconfigtest.c b/tests/xmconfigtest.c
index a15a7ff19..c184b8df0 100644
--- a/tests/xmconfigtest.c
+++ b/tests/xmconfigtest.c
@@ -68,7 +68,7 @@ testCompareParseXML(const char *xmcfg, const char *xml, int xendConfigVersion)
priv.caps = caps;
conn->privateData = &priv;
- if (!(def = virDomainDefParseString(caps, xmlData,
+ if (!(def = virDomainDefParseString(caps, xmlData, 1 << VIR_DOMAIN_VIRT_XEN,
VIR_DOMAIN_XML_INACTIVE)))
goto fail;