]> xenbits.xensource.com Git - libvirt.git/commitdiff
schema: Restrict mode to octal
authorPhilipp Hahn <hahn@univention.de>
Tue, 26 Feb 2013 08:14:20 +0000 (09:14 +0100)
committerEric Blake <eblake@redhat.com>
Tue, 26 Feb 2013 23:23:21 +0000 (16:23 -0700)
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>
docs/schemas/basictypes.rng
docs/schemas/storagepool.rng
docs/schemas/storagevol.rng

index ec1d9402189f56a821fea610ee4a685e493387c5..e6cf90753ec3508e214806dd555ab607c75ced4d 100644 (file)
     </data>
   </define>
 
+  <define name='octalMode'>
+    <data type="unsignedInt">
+      <param name='pattern'>[0-7]+</param>
+    </data>
+  </define>
+
   <define name="uint8range">
     <choice>
       <data type="string">
index 165e27643fe6a42db0a47fe76c59e49294266630..2b1f08dd5e503fca415e88133c2fdac80b32acee 100644 (file)
     <optional>
       <element name='permissions'>
         <element name='mode'>
-          <ref name='unsignedInt'/>
+          <ref name='octalMode'/>
         </element>
         <element name='owner'>
           <choice>
index 10b7847ebfed04f18f67ededbdd983b443a7edfe..d4a29c7f3a6b56ae2a54b7b36c79e64d1dbb71dd 100644 (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'/>