[Openvas-commits] r9207 - trunk/doc/website

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Oct 12 19:34:26 CEST 2010


Author: mattm
Date: 2010-10-12 19:34:26 +0200 (Tue, 12 Oct 2010)
New Revision: 9207

Modified:
   trunk/doc/website/openvas-cr-28.htm4
Log:
Add examples and better explanations of the MODIFY_CONFIG alternatives,
correcting the descriptions of the boolean elements.


Modified: trunk/doc/website/openvas-cr-28.htm4
===================================================================
--- trunk/doc/website/openvas-cr-28.htm4	2010-10-12 13:29:15 UTC (rev 9206)
+++ trunk/doc/website/openvas-cr-28.htm4	2010-10-12 17:34:26 UTC (rev 9207)
@@ -3941,7 +3941,7 @@
 </p>
 
 <p>
-A preference must include a name.
+The first option, a preference, must include a name.
 If the preference includes an NVT, then the preference is an NVT preference,
 otherwise the preference is a Scanner preference.  If the preference includes
 a value then the manager updates the value of the preference, otherwise the
@@ -3949,17 +3949,42 @@
 </p>
 
 <p>
-An NVT selection must include a family and may include any number of NVTs.
+The second option, a family selection, lets the client modify the NVTs selected
+by the config at a family level.  The idea is that the client modifies the
+entire family selection at once, so a client will often need to include many
+families in a family selection.
 </p>
 
 <p>
-A family selection may include a "growing" and any number of families.  A
-m4_dnl TODO the manager should check if families all have names, instead of just
-m4_dnl      skipping them.
-family must include a name and may include an "all" and a "growing".
+The family_selection may include a growing element to indicate whether new
+families should be added to the selection.  It may also include any number
+of family elements.
 </p>
 
 <p>
+A family element must always include a name and may include a growing element
+and an all element.  The all element indicates whether all NVTs in the family
+should be selected.  The growing element indicates whether new NVTs in the
+family should be added to the selection as they arrive.  Leaving a family
+out of the family_selection is equivalent to including the family with all
+0 and growing 0.
+</p>
+
+<p>
+The effect of the all 0 and growing 0 case is subtle: if
+all NVTs were selected then all are removed (effectively removing the
+family from the config).  However if some NVTs were selected then they
+remain selected.  As a result the client must include in the
+family_selection all families that must have all NVTs selected.
+</p>
+
+<p>
+The third option, an NVT selection, must include a family and may include any
+number of NVTs.  The manager updates the given family in the config to
+include only the given NVTs.
+</p>
+
+<p>
 If there was no error with the command sent by the client, the manager will
 apply the changes to the config and will reply with a response code indicating
 success.
@@ -3990,12 +4015,12 @@
   <li>
     &lt;family_selection&gt;
     <ul>
-      <li>&lt;growing&gt; is an empty element.</li>
+      <li>&lt;growing&gt; is boolean (after C atoi conversion, 0 is false, anything else is true).</li>
       <li>
         &lt;family&gt;
         <ul>
-          <li>&lt;all&gt; is an empty element.</li>
-          <li>&lt;growing&gt; is an empty element.</li>
+          <li>&lt;all&gt; is boolean (after C atoi conversion, 0 is false, anything else is true).</li>
+          <li>&lt;growing&gt; is boolean (after C atoi conversion, 0 is false, anything else is true).</li>
           <li>&lt;name&gt; is the name of an NVT family.</li>
         </ul>
       </li>
@@ -4011,7 +4036,7 @@
 </ul>
 </p>
 
-<h5>Example:</h5>
+<h5>Examples:</h5>
 
 <p>
 <b>C:</b>
@@ -4051,6 +4076,135 @@
 &lt;modify_config_response status="500" status_text="Internal error" /&gt;
 </pre>
 
+<p>
+<b>C:</b>
+</p>
+
+<pre>
+&lt;modify_config config_id="254cd3ef-bbe1-4d58-859d-21b8d0c046c6"&gt;
+  &lt;family_selection&gt;
+    &lt;!-- Set the config to add any new families that arrive. --&gt;
+    &lt;growing&gt;1&lt;/growing&gt;
+    &lt;!-- Keep the single family that has all NVTs selected --&gt;
+    &lt;family&gt;
+      &lt;name&gt;Debian Local Security Checks&lt;/name&gt;
+      &lt;all&gt;1&lt;/all&gt;
+      &lt;growing&gt;1&lt;/growing&gt;
+    &lt;/family&gt;
+  &lt;/family_selection&gt;
+&lt;/modify_config&gt;
+</pre>
+
+<p>
+<b>M:</b>
+</p>
+
+<pre>
+&lt;modify_config_response status="200" status_text="OK" /&gt;
+</pre>
+
+<p>
+<b>M:</b>
+</p>
+
+<pre>
+&lt;modify_config_response status="4xx" /&gt;
+</pre>
+
+<p>
+<b>M:</b>
+</p>
+
+<pre>
+&lt;modify_config_response status="500" status_text="Internal error" /&gt;
+</pre>
+
+<p>
+<b>C:</b>
+</p>
+
+<pre>
+&lt;modify_config config_id="254cd3ef-bbe1-4d58-859d-21b8d0c046c6"&gt;
+  &lt;family_selection&gt;
+    &lt;!-- Keep the single family that has all NVTs selected --&gt;
+    &lt;family&gt;
+      &lt;name&gt;Debian Local Security Checks&lt;/name&gt;
+      &lt;all&gt;1&lt;/all&gt;
+      &lt;growing&gt;1&lt;/growing&gt;
+    &lt;/family&gt;
+    &lt;!-- Switch a family to receive any new NVTs that arrive. --&gt;
+    &lt;family&gt;
+      &lt;name&gt;General&lt;/name&gt;
+      &lt;growing&gt;1&lt;/growing&gt;
+    &lt;/family&gt;
+  &lt;/family_selection&gt;
+&lt;/modify_config&gt;
+</pre>
+
+<p>
+<b>M:</b>
+</p>
+
+<pre>
+&lt;modify_config_response status="200" status_text="OK" /&gt;
+</pre>
+
+<p>
+<b>M:</b>
+</p>
+
+<pre>
+&lt;modify_config_response status="4xx" /&gt;
+</pre>
+
+<p>
+<b>M:</b>
+</p>
+
+<pre>
+&lt;modify_config_response status="500" status_text="Internal error" /&gt;
+</pre>
+
+<p>
+<b>C:</b>
+</p>
+
+<pre>
+&lt;modify_config config_id="254cd3ef-bbe1-4d58-859d-21b8d0c046c6"&gt;
+  &lt;nvt_selection&gt;
+    &lt;family&gt;Debian Local Security Checks&lt;/family&gt;
+    &lt;nvt oid="1.3.6.1.4.1.25623.1.0.53797"/&gt;
+    &lt;nvt oid="1.3.6.1.4.1.25623.1.0.63272"/&gt;
+    &lt;nvt oid="1.3.6.1.4.1.25623.1.0.55615"/&gt;
+    &lt;nvt oid="1.3.6.1.4.1.25623.1.0.53546"/&gt;
+  &lt;/nvt_selection&gt;
+&lt;/modify_config&gt;
+</pre>
+
+<p>
+<b>M:</b>
+</p>
+
+<pre>
+&lt;modify_config_response status="200" status_text="OK" /&gt;
+</pre>
+
+<p>
+<b>M:</b>
+</p>
+
+<pre>
+&lt;modify_config_response status="4xx" /&gt;
+</pre>
+
+<p>
+<b>M:</b>
+</p>
+
+<pre>
+&lt;modify_config_response status="500" status_text="Internal error" /&gt;
+</pre>
+
 <h4 id="modify_note">modify_note</h4>
 
 <p>
@@ -4748,6 +4902,9 @@
 <h3>History</h3>
 
 <ul>
+<li> 2010-10-12 Matthew Mundell &lt;matthew.mundell at greenbone.net&gt;:<br>
+     Add examples and better explanations of the MODIFY_CONFIG alternatives,
+     correcting the descriptions of the boolean elements.  </li>
 <li> 2010-10-11 Matthew Mundell &lt;matthew.mundell at greenbone.net&gt;:<br>
      Cleanup GET_NVTS_RESPONSE brackets.  </li>
 <li> 2010-10-04 Matthew Mundell &lt;matthew.mundell at greenbone.net&gt;:<br>



More information about the Openvas-commits mailing list