
On 01/23/2012 10:53 AM, Peter Krempa wrote:
The domain schema enforced restrictions on the domain name string that the code doesn't. This patch relaxes the check, leaving the restrictions on the driver or hypervisor. --- And maybe we should consider adding some restrictions on the qemu driver, as the daemon is competely fine with creating a domain with the name "../../../../../../../test" that has its configuration stored in "/test.xml" then.
Yes, that point has been brought up before in the past. Snapshot names are another culprit. But it should be a separate patch, per hypervisor; I agree that this patch allowing the XML to be permissive makes sense (since the RNG can't enforce hypervisor-specific restrictions).
docs/schemas/domaincommon.rng | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 2041dfb..1922cd6 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -3003,9 +3003,7 @@ </data> </define> <define name="domainName"> - <data type="string"> - <param name="pattern">[A-Za-z0-9_\.\+\-&:/]+</param> - </data> + <data type="string" />
ACK. Nit - although XML allows space before />, we typically haven't been using it, so I would have written <data type='string'/> without the space. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org