1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-26 14:03:49 +03:00

schema: Restrict mode to octal

virStrToLong(..., 8, ...) already requires the mode to be octal.
Change the relax-ng schema to check for octal as well.

Signed-off-by: Philipp Hahn <hahn@univention.de>
This commit is contained in:
Philipp Hahn 2013-02-26 09:14:20 +01:00 committed by Eric Blake
parent 9194679e10
commit 141deb9feb
3 changed files with 8 additions and 2 deletions

View File

@ -20,6 +20,12 @@
</data>
</define>
<define name='octalMode'>
<data type="unsignedInt">
<param name='pattern'>[0-7]+</param>
</data>
</define>
<define name="uint8range">
<choice>
<data type="string">

View File

@ -175,7 +175,7 @@
<optional>
<element name='permissions'>
<element name='mode'>
<ref name='unsignedInt'/>
<ref name='octalMode'/>
</element>
<element name='owner'>
<choice>

View File

@ -46,7 +46,7 @@
<optional>
<element name='permissions'>
<element name='mode'>
<ref name='unsignedInt'/>
<ref name='octalMode'/>
</element>
<element name='owner'>
<ref name='unsignedInt'/>