From c7d6d5a6caa2befecb1bba83dfdac6cc0f749ac4 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 (cherry picked from commit c4b92f1a8a9cb64a2c4a9f0ed899ed8a7d95d935) --- 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 a83063afcc..12cab6a3ee 100644 --- a/docs/schemas/basictypes.rng +++ b/docs/schemas/basictypes.rng @@ -230,25 +230,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 + + + + + + +
+ + + +
+ + + -- 2.47.3