[Openvas-commits] r5808 - in trunk/gsa: . src src/html/src/help
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Nov 6 23:15:39 CET 2009
Author: jan
Date: 2009-11-06 23:15:38 +0100 (Fri, 06 Nov 2009)
New Revision: 5808
Added:
trunk/gsa/src/html/src/help/reports.htm4
Modified:
trunk/gsa/ChangeLog
trunk/gsa/src/validator.c
trunk/gsa/src/validator.h
Log:
* src/html/src/help/reports.htm4: New.
* src/validator.c (openvas_validator_alias): New.
(openvas_validate): Some more tracef-calls.
* src/validator.h: Add proto accordingly.
Modified: trunk/gsa/ChangeLog
===================================================================
--- trunk/gsa/ChangeLog 2009-11-06 21:19:19 UTC (rev 5807)
+++ trunk/gsa/ChangeLog 2009-11-06 22:15:38 UTC (rev 5808)
@@ -1,5 +1,14 @@
2009-11-06 Jan-Oliver Wagner <jan-oliver.wagner at greenbone.net>
+ * src/html/src/help/reports.htm4: New.
+
+ * src/validator.c (openvas_validator_alias): New.
+ (openvas_validate): Some more tracef-calls.
+
+ * src/validator.h: Add proto accordingly.
+
+2009-11-06 Jan-Oliver Wagner <jan-oliver.wagner at greenbone.net>
+
* src/html/src/about.htm4, src/html/src/gplv2.htm4: New.
* src/html/src/img/edit_inactive.png,
Added: trunk/gsa/src/html/src/help/reports.htm4
===================================================================
--- trunk/gsa/src/html/src/help/reports.htm4 2009-11-06 21:19:19 UTC (rev 5807)
+++ trunk/gsa/src/html/src/help/reports.htm4 2009-11-06 22:15:38 UTC (rev 5808)
@@ -0,0 +1,145 @@
+m4_define(`PAGE_TITLE', `Help: Reports')
+m4_include(`header.m4')
+
+<div style="float:left;"><a href="/help/contents.html">Help Contents</a></div>
+<div style="float:right;"><a href="/omp?cmd=get_status&task_id=343435d6-91b0-11de-9478-ffd71f4c6f29">Jump to dialog with sample content</a></div>
+ <br />
+
+<a name="tasksummary"></a>
+<h1>Task Summary</h1>
+
+<p>
+This information dialog lists name, status and number of reports for
+the task for which the report list is shown below.
+</p>
+
+<a name="reports"></a>
+<h1>Reports</h1>
+
+<p>
+This table provides on overview on all
+<a href="glossary.html#report">reports</a>
+for the selected task (see Task Summary box).
+</p>
+
+<table class="gbntable">
+<tr class="gbntablehead2">
+ <td>Column</td>
+ <td>Description</td>
+</tr>
+<tr class="odd">
+ <td>Report</td>
+ <td>Shows the time stamp for the report. This indicates
+ when the scan finished and the final report
+ was created.</td>
+</tr>
+<tr>
+ <td>Threat</td>
+ <td>Threat level of the report. These levels
+ can occur:
+ <br />
+ <table>
+ <tr>
+ <td valign="top"><img src="/img/last_report_status_high.png" /></td>
+ <td>
+ High: At least one NVT reported severity "High" for at least one
+ target host in the report.
+ </td>
+ </tr><tr>
+ <td valign="top"><img src="/img/last_report_status_medium.png" /></td>
+ <td>
+ Medium: Severity "High" does not occur in the
+ report. At least one NVT reported severity "Medium"
+ for at least one target host in the report.
+ </td>
+ </tr><tr>
+ <td valign="top"><img src="/img/last_report_status_low.png" /></td>
+ <td>
+ Low: Neither severity "High" nor "Medium" occurs in the report.
+ At least one NVT reported severity "Low" for at
+ least one target host in the report.
+ </td>
+ </tr><tr>
+ <td valign="top"><img src="/img/last_report_status_none.png" /></td>
+ <td>
+ None: The report does not contain a single severe finding. This could
+ also mean that the scan was interrupted or failed, especially if
+ even no log information occur in the report.
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+<tr class="odd">
+ <td>Scan Results</td>
+ <td>This column lists the number
+ of occurances for each severity level.
+ <br />
+ <table>
+ <tr><td valign="top"><img src="/img/report_high.png" alt="High" title="High" /></td><td>
+ The number of issues of severity "High" found during the scan.
+ </td></tr>
+ <tr><td valign="top"><img src="/img/report_medium.png" alt="Medium" title="Medium" /></td><td>
+ The number of issues of severity "Medium" found during the scan.
+ </td></tr>
+ <tr><td valign="top"><img src="/img/report_low.png" alt="Low" title="Low" /></td><td>
+ The number of issues of severity "Low" found during the scan.
+ </td></tr>
+ <tr><td valign="top"><img src="/img/report_log.png" alt="Log" title="Log" /></td><td>
+ The number of log-entries that occured during the scan.
+ </td></tr>
+ </table>
+ </td>
+</tr>
+<tr>
+ <td>Download</td>
+ <td>This field offers to download the report in various formats:
+ <br />
+ <table>
+ <tr><td valign="top">PDF:</td><td>
+ A single PDF file is created from the report details.
+ </td></tr>
+ <tr><td valign="top">HTML:</td><td>
+ A single HTML file is created from the report details.
+ This is similar to the page created via action "Details"
+ but is an self-contained document that could be viewed
+ independent of GSA.
+ </td></tr>
+ <tr><td valign="top">XML:</td><td>
+ A single XML file is created from the report details.
+ This should be the basis for creating your own style
+ for a report or post-process the results in other ways.
+ </td></tr>
+ <tr><td valign="top">NBE:</td><td>
+ A single NBE file is created. This format is supported
+ by OpenVAS-Client and in the past often used for
+ post-processing the results. It is offered primarily
+ for compatibility purposes. It is recommended to
+ set up post-processing based on the XML file, not
+ based on the NBE file.
+ </td></tr>
+ </table>
+ </td>
+</tr>
+</table>
+
+<a name="actions"></a>
+<h3>Actions</h3>
+
+<h4>Details</h4>
+
+<p>
+Pressing the details icon
+<img src="/img/details.png" alt="Details" title="Details" /> will
+display all report details on a new page
+<a href="/help/view_report.html">View Report</a>.
+</p>
+
+<h4>Delete Report</h4>
+
+<p>
+Pressing the delete icon <img src="/img/delete.png" alt="Delete" title="Delete" /> will
+remove the report immediately. The list of reports will be updated.
+</p>
+
+m4_include(`footer.m4')
Modified: trunk/gsa/src/validator.c
===================================================================
--- trunk/gsa/src/validator.c 2009-11-06 21:19:19 UTC (rev 5807)
+++ trunk/gsa/src/validator.c 2009-11-06 22:15:38 UTC (rev 5808)
@@ -79,6 +79,32 @@
}
/**
+ * @brief Make an alias for a rule name.
+ *
+ * @param validator Validator to add alias to.
+ * @param alias Name of alias for rule.
+ * @param name Name of the rule.
+ *
+ * @return 0 success, -1 error.
+ */
+int
+openvas_validator_alias (validator_t validator,
+ const char *alias,
+ const char *name)
+{
+ gpointer key, regex;
+
+ if (g_hash_table_lookup_extended (validator, name, &key, ®ex))
+ {
+ g_hash_table_insert (validator,
+ (gpointer) g_strdup (alias),
+ (gpointer) (regex ? g_strdup (regex) : NULL));
+ return 0;
+ }
+ return -1;
+}
+
+/**
* @brief Validate a string for a given rule.
*
* @param validator Validator to validate from.
@@ -93,6 +119,8 @@
{
gpointer key, regex;
+ tracef ("%s: name %s value %s", __FUNCTION__, name, value);
+
if (g_hash_table_lookup_extended (validator, name, &key, ®ex))
{
if (regex == NULL)
@@ -106,6 +134,12 @@
return 2;
}
+ if (value == NULL)
+ {
+ tracef ("%s: failed to match, value NULL", __FUNCTION__);
+ return 2;
+ }
+
tracef ("matching <%s> against <%s>: ", (char *) regex, value);
if (g_regex_match_simple ((const gchar *) regex,
(const gchar *) value,
@@ -119,7 +153,7 @@
return 2;
}
- tracef ("%s: failed to find name", __FUNCTION__);
+ tracef ("%s: failed to find name: %s", __FUNCTION__, name);
return 1;
}
Modified: trunk/gsa/src/validator.h
===================================================================
--- trunk/gsa/src/validator.h 2009-11-06 21:19:19 UTC (rev 5807)
+++ trunk/gsa/src/validator.h 2009-11-06 22:15:38 UTC (rev 5808)
@@ -41,6 +41,7 @@
validator_t openvas_validator_new ();
void openvas_validator_add (validator_t, const char *, const char *);
+int openvas_validator_alias (validator_t, const char *, const char *);
int openvas_validate (validator_t, const char *, const char *);
void openvas_validator_free (validator_t);
More information about the Openvas-commits
mailing list