From c4b92f1a8a9cb64a2c4a9f0ed899ed8a7d95d935 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Fri, 12 Aug 2016 10:52:30 +0200 Subject: [PATCH] schema: Don't validate paths https://bugzilla.redhat.com/show_bug.cgi?id=1353296 On UNIX like systems there are no constraints on what characters can be in file/dir names (except for NULL, obviously). Moreover, some values that we think of as paths (e.g. disk source) are not necessarily paths at all. For instance, some hypervisors take that as an arbitrary identifier and corresponding file is then looked up by hypervisor in its table. Instead of trying to fix our regular expressions (and forgetting to include yet another character there), lets drop the validation completely. Signed-off-by: Michal Privoznik --- docs/schemas/basictypes.rng | 8 ++--- .../domain-disk-source-space.xml | 36 +++++++++++++++++++ 2 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 tests/domainschemadata/domain-disk-source-space.xml diff --git a/docs/schemas/basictypes.rng b/docs/schemas/basictypes.rng index 474ad77b28..1b4f980e75 100644 --- a/docs/schemas/basictypes.rng +++ b/docs/schemas/basictypes.rng @@ -247,25 +247,25 @@ - [a-zA-Z0-9_\.\+\-\\&"'<>/%]+ + .+ - [a-zA-Z0-9_\.\+\-\\&"'<>/%]+ + .+ - /[a-zA-Z0-9_\.\+\-\\&"'<>/%,:]+ + /.+ - /[a-zA-Z0-9_\.\+\-\\&"'<>/%]* + /.* diff --git a/tests/domainschemadata/domain-disk-source-space.xml b/tests/domainschemadata/domain-disk-source-space.xml new file mode 100644 index 0000000000..553b6c7f01 --- /dev/null +++ b/tests/domainschemadata/domain-disk-source-space.xml @@ -0,0 +1,36 @@ + + dummy + aa86471a-e67b-41b1-8d7d-2dc37c2ac5ec + 2097152 + 2097152 + 4 + + hvm + + + + + + destroy + restart + restart + + + + + + /usr/bin/qemu-system-x86_64 + + + + + + +
+ + + +
+ + +