mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-03 07:33:50 +00:00
Error out on missing machine type in machine configs
Commit f1a89a8 allowed parsing configs from /etc/libvirt without validating the emulator capabilities. Check for the presence of os->type.machine even if the VIR_DOMAIN_DEF_PARSE_SKIP_OSTYPE_CHECKS flag is set, otherwise the daemon can crash on carelessly crafted input in the config directory. https://bugzilla.redhat.com/show_bug.cgi?id=1267256
This commit is contained in:
parent
b4c6fa4418
commit
55e6d8cd9e
@ -14841,6 +14841,12 @@ virDomainDefParseXML(xmlDocPtr xml,
|
||||
goto error;
|
||||
}
|
||||
VIR_FREE(capsdata);
|
||||
} else {
|
||||
if (!def->os.machine) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Missing machine type"));
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
/* Extract domain name */
|
||||
|
Loading…
x
Reference in New Issue
Block a user