[libvirt] [PATCH 4/4] Make secrets RNG more strict

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* docs/schemas/secret.rng: Require volume element to be an absolute
  path. Fix whitespace indentation
---
 docs/schemas/secret.rng |   68 +++++++++++++++++++++++++---------------------
 1 files changed, 37 insertions(+), 31 deletions(-)

diff --git a/docs/schemas/secret.rng b/docs/schemas/secret.rng
index 2aab1db..40e2b7f 100644
--- a/docs/schemas/secret.rng
+++ b/docs/schemas/secret.rng
@@ -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>
 
@@ -65,4 +65,10 @@
     </choice>
   </define>
 
+  <define name="absFilePath">
+    <data type="string">
+      <param name="pattern">/[a-zA-Z0-9_\.\+\-&amp;/%]+</param>
+    </data>
+  </define>
+
 </grammar>
-- 
1.6.2.5

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]