[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>
<family_selection>
<ul>
- <li><growing> is an empty element.</li>
+ <li><growing> is boolean (after C atoi conversion, 0 is false, anything else is true).</li>
<li>
<family>
<ul>
- <li><all> is an empty element.</li>
- <li><growing> is an empty element.</li>
+ <li><all> is boolean (after C atoi conversion, 0 is false, anything else is true).</li>
+ <li><growing> is boolean (after C atoi conversion, 0 is false, anything else is true).</li>
<li><name> 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 @@
<modify_config_response status="500" status_text="Internal error" />
</pre>
+<p>
+<b>C:</b>
+</p>
+
+<pre>
+<modify_config config_id="254cd3ef-bbe1-4d58-859d-21b8d0c046c6">
+ <family_selection>
+ <!-- Set the config to add any new families that arrive. -->
+ <growing>1</growing>
+ <!-- Keep the single family that has all NVTs selected -->
+ <family>
+ <name>Debian Local Security Checks</name>
+ <all>1</all>
+ <growing>1</growing>
+ </family>
+ </family_selection>
+</modify_config>
+</pre>
+
+<p>
+<b>M:</b>
+</p>
+
+<pre>
+<modify_config_response status="200" status_text="OK" />
+</pre>
+
+<p>
+<b>M:</b>
+</p>
+
+<pre>
+<modify_config_response status="4xx" />
+</pre>
+
+<p>
+<b>M:</b>
+</p>
+
+<pre>
+<modify_config_response status="500" status_text="Internal error" />
+</pre>
+
+<p>
+<b>C:</b>
+</p>
+
+<pre>
+<modify_config config_id="254cd3ef-bbe1-4d58-859d-21b8d0c046c6">
+ <family_selection>
+ <!-- Keep the single family that has all NVTs selected -->
+ <family>
+ <name>Debian Local Security Checks</name>
+ <all>1</all>
+ <growing>1</growing>
+ </family>
+ <!-- Switch a family to receive any new NVTs that arrive. -->
+ <family>
+ <name>General</name>
+ <growing>1</growing>
+ </family>
+ </family_selection>
+</modify_config>
+</pre>
+
+<p>
+<b>M:</b>
+</p>
+
+<pre>
+<modify_config_response status="200" status_text="OK" />
+</pre>
+
+<p>
+<b>M:</b>
+</p>
+
+<pre>
+<modify_config_response status="4xx" />
+</pre>
+
+<p>
+<b>M:</b>
+</p>
+
+<pre>
+<modify_config_response status="500" status_text="Internal error" />
+</pre>
+
+<p>
+<b>C:</b>
+</p>
+
+<pre>
+<modify_config config_id="254cd3ef-bbe1-4d58-859d-21b8d0c046c6">
+ <nvt_selection>
+ <family>Debian Local Security Checks</family>
+ <nvt oid="1.3.6.1.4.1.25623.1.0.53797"/>
+ <nvt oid="1.3.6.1.4.1.25623.1.0.63272"/>
+ <nvt oid="1.3.6.1.4.1.25623.1.0.55615"/>
+ <nvt oid="1.3.6.1.4.1.25623.1.0.53546"/>
+ </nvt_selection>
+</modify_config>
+</pre>
+
+<p>
+<b>M:</b>
+</p>
+
+<pre>
+<modify_config_response status="200" status_text="OK" />
+</pre>
+
+<p>
+<b>M:</b>
+</p>
+
+<pre>
+<modify_config_response status="4xx" />
+</pre>
+
+<p>
+<b>M:</b>
+</p>
+
+<pre>
+<modify_config_response status="500" status_text="Internal error" />
+</pre>
+
<h4 id="modify_note">modify_note</h4>
<p>
@@ -4748,6 +4902,9 @@
<h3>History</h3>
<ul>
+<li> 2010-10-12 Matthew Mundell <matthew.mundell at greenbone.net>:<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 <matthew.mundell at greenbone.net>:<br>
Cleanup GET_NVTS_RESPONSE brackets. </li>
<li> 2010-10-04 Matthew Mundell <matthew.mundell at greenbone.net>:<br>
More information about the Openvas-commits
mailing list