]> xenbits.xensource.com Git - libvirt.git/commitdiff
Make secrets RNG more strict
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 11 Sep 2009 13:04:41 +0000 (14:04 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 14 Sep 2009 16:49:37 +0000 (17:49 +0100)
* docs/schemas/secret.rng: Require volume element to be an absolute
  path. Fix whitespace indentation

docs/schemas/secret.rng

index 2aab1db1f84acbeb3a7fdf0ca2d09c9e1df0bd12..40e2b7ffa64311f2a18d03d9674bcba282ceab82 100644 (file)
@@ -7,40 +7,40 @@
   <define name='secret'>
     <element name='secret'>
       <optional>
-       <attribute name='ephemeral'>
-         <choice>
-           <value>yes</value>
-           <value>no</value>
-         </choice>
-       </attribute>
+        <attribute name='ephemeral'>
+          <choice>
+            <value>yes</value>
+            <value>no</value>
+          </choice>
+        </attribute>
       </optional>
       <optional>
-       <attribute name='private'>
-         <choice>
-           <value>yes</value>
-           <value>no</value>
-         </choice>
-       </attribute>
+        <attribute name='private'>
+          <choice>
+            <value>yes</value>
+            <value>no</value>
+          </choice>
+        </attribute>
       </optional>
       <interleave>
-       <optional>
-         <element name='uuid'>
-           <ref name='UUID'/>
-         </element>
-       </optional>
-       <optional>
-         <element name='description'>
-           <text/>
-         </element>
-       </optional>
-       <optional>
-         <element name='usage'>
-           <choice>
-             <ref name='usagevolume'>
-           </choice>
-           <text/>
-         </element>
-       </optional>
+        <optional>
+          <element name='uuid'>
+            <ref name='UUID'/>
+          </element>
+        </optional>
+        <optional>
+          <element name='description'>
+            <text/>
+          </element>
+        </optional>
+        <optional>
+          <element name='usage'>
+            <choice>
+              <ref name='usagevolume'>
+              <!-- More choices later -->
+            </choice>
+          </element>
+        </optional>
       </interleave>
     </element>
   </define>
@@ -50,7 +50,7 @@
       <value>volume</value>
     </attribute>
     <element name='volume'>
-      <text/>
+      <ref name='absFilePath'/>
     </element>
   </define>
 
     </choice>
   </define>
 
+  <define name="absFilePath">
+    <data type="string">
+      <param name="pattern">/[a-zA-Z0-9_\.\+\-&amp;/%]+</param>
+    </data>
+  </define>
+
 </grammar>