]> xenbits.xensource.com Git - libvirt.git/commit
conf: domain: reject name containing '/'
authorCole Robinson <crobinso@redhat.com>
Tue, 26 Apr 2016 15:23:12 +0000 (11:23 -0400)
committerCole Robinson <crobinso@redhat.com>
Mon, 2 May 2016 14:06:04 +0000 (10:06 -0400)
commitb1fc6a7b73f2058742b4c980c2e3573e9d0c65a2
treebddc043ac7a2054c213145b6cb51be822209df5d
parent541f21afa609a3698908fa21a6e78bcd8dbdfcc9
conf: domain: reject name containing '/'

Trying to define a domain name containing an embedded '/'
will immediately fail when trying to write the XML to disk for
our stateful drivers. This patch explicitly rejects names
containing a '/', and provides an xmlopt feature for drivers
to avoid this validation check, which is enabled in every
non-stateful driver that already has xmlopt handling wired up.

(Technically this could reject a previously accepted vmname like
 '/foo', however at least for the qemu driver that falls over
 later when starting qemu)

https://bugzilla.redhat.com/show_bug.cgi?id=639923
src/conf/domain_conf.c
src/conf/domain_conf.h
src/openvz/openvz_driver.c
src/phyp/phyp_driver.c
src/vbox/vbox_common.c
src/vmx/vmx.c
src/xenapi/xenapi_driver.c
tests/genericxml2xmlindata/generic-name-slash-fail.xml [new file with mode: 0644]
tests/genericxml2xmltest.c