libvirt/src/bhyve
Eric Blake 27c8fd7490 domain: Fix unknown flags diagnosis in virDomainGetXMLDesc
Many drivers had a comment that they did not validate the incoming
'flags' to virDomainGetXMLDesc() because they were relying on
virDomainDefFormat() to do it instead. This used to be the case
(at least since 461e0f1a and friends in 0.9.4 added unknown flag
checking in general), but regressed in commit 0ecd6851 (1.2.12),
when all of the drivers were changed to pass 'flags' through the
new helper virDomainDefFormatConvertXMLFlags(). Since this helper
silently ignores unknown flags, we need to implement flag checking
in each driver instead.

Annoyingly, this means that any new flag values added will silently
be ignored when targeting an older libvirt, rather than our usual
practice of loudly diagnosing an unsupported flag.  Add comments
in domain_conf.[ch] to remind us to be extra vigilant about the
impact when adding flags (a new flag to add data is safe if the
older server omitting the requested data doesn't break things in
the newer client; a new flag to suppress data rather than enhancing
the existing VIR_DOMAIN_XML_SECURE may form a data leak or even a
security hole).

In the qemu driver, there are multiple callers all funnelling to
qemuDomainDefFormatBufInternal(); many of them already validated
flags (and often only a subset of the full set of possible flags),
but for ease of maintenance, we can also check flags at the common
helper function.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2019-02-19 16:52:51 -06:00
..
bhyve_capabilities.c internal: Move <stdio.h> include to internal.h 2018-09-20 10:16:38 +02:00
bhyve_capabilities.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
bhyve_command.c bhyve: emit warning when using bhyve:commandline 2019-02-01 22:08:55 +04:00
bhyve_command.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
bhyve_conf.c Require a semicolon for VIR_ONCE_GLOBAL_INIT calls 2019-02-03 17:46:29 -05:00
bhyve_conf.h bhyve: implement support for commandline args 2019-01-27 14:54:52 +04:00
bhyve_device.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
bhyve_device.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
bhyve_domain.c bhyve: bhyveDomainDefNamespaceFormatXML cleanup 2019-02-01 22:08:55 +04:00
bhyve_domain.h bhyve: implement support for commandline args 2019-01-27 14:54:52 +04:00
bhyve_driver.c domain: Fix unknown flags diagnosis in virDomainGetXMLDesc 2019-02-19 16:52:51 -06:00
bhyve_driver.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
bhyve_monitor.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
bhyve_monitor.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
bhyve_parse_command.c bhyve: use virDomainDiskDefNew to instead of VIR_ALLOC 2019-02-18 10:27:30 +01:00
bhyve_parse_command.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
bhyve_process.c src: remove blank first line in function body 2018-09-17 13:29:01 +02:00
bhyve_process.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
bhyve_utils.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
bhyve.conf bhyve: add config file support 2017-03-14 20:46:05 +04:00
libvirtd_bhyve.aug bhyve: add config file support 2017-03-14 20:46:05 +04:00
Makefile.inc.am make: split bhyve driver build rules into bhyve/Makefile.inc.am 2018-02-23 13:14:26 +00:00
test_libvirtd_bhyve.aug.in bhyve: add config file support 2017-03-14 20:46:05 +04:00