[Openvas-commits] r11619 - in trunk/openvas-manager: . src
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Sep 15 17:59:33 CEST 2011
Author: mattm
Date: 2011-09-15 17:59:32 +0200 (Thu, 15 Sep 2011)
New Revision: 11619
Modified:
trunk/openvas-manager/ChangeLog
trunk/openvas-manager/src/manage_sql.c
Log:
* src/manage_sql.c (print_report_xml): Remove SCAP details from prognostic
report.
Modified: trunk/openvas-manager/ChangeLog
===================================================================
--- trunk/openvas-manager/ChangeLog 2011-09-15 15:48:01 UTC (rev 11618)
+++ trunk/openvas-manager/ChangeLog 2011-09-15 15:59:32 UTC (rev 11619)
@@ -1,5 +1,9 @@
2011-09-15 Matthew Mundell <matthew.mundell at greenbone.net>
+ * src/manage_sql.c (print_report_xml):
+
+2011-09-15 Matthew Mundell <matthew.mundell at greenbone.net>
+
Add single host prognostic reports.
* src/manage_sql.c (init_prognosis_iterator): Add description and CPE
Modified: trunk/openvas-manager/src/manage_sql.c
===================================================================
--- trunk/openvas-manager/src/manage_sql.c 2011-09-15 15:48:01 UTC (rev 11618)
+++ trunk/openvas-manager/src/manage_sql.c 2011-09-15 15:59:32 UTC (rev 11619)
@@ -15428,86 +15428,21 @@
init_report_host_details_iterator
(&details, report_host);
while (next (&details))
- {
- int highest_cvss;
- const char *value;
- value = report_host_details_iterator_value (&details);
-
- PRINT (out,
- "<detail>"
- "<name>%s</name>"
- "<value>%s</value>"
- "<source>"
- "<type>%s</type>"
- "<name>%s</name>"
- "<description>%s</description>"
- "</source>"
- "</detail>",
- report_host_details_iterator_name (&details),
- value,
- report_host_details_iterator_source_type (&details),
- report_host_details_iterator_source_name (&details),
- report_host_details_iterator_source_desc (&details));
-
- highest_cvss = -1;
- if (scap_loaded
- && (strcmp (report_host_details_iterator_name
- (&details),
- "App")
- == 0))
- {
- iterator_t prognosis;
- int cvss;
- int first;
-
- first = 1;
- cvss = -1;
- init_prognosis_iterator (&prognosis, value);
- while (next (&prognosis))
- {
- if (first)
- {
- cvss = prognosis_iterator_cvss_int
- (&prognosis);
- if (cvss > highest_cvss)
- highest_cvss = cvss;
- first = 0;
- }
-
- PRINT (out,
- "<detail>"
- "<name>%s/CVE</name>"
- "<value>%s</value>"
- "</detail>"
- "<detail>"
- "<name>%s/%s/CVSS</name>"
- "<value>%s</value>"
- "</detail>",
- value,
- prognosis_iterator_cve (&prognosis),
- value,
- prognosis_iterator_cve (&prognosis),
- prognosis_iterator_cvss (&prognosis));
- }
- if (cvss >= 0)
- PRINT (out,
- "<detail>"
- "<name>%s/threat</name>"
- "<value>%s</value>"
- "</detail>",
- value,
- cvss_threat (cvss));
- cleanup_iterator (&prognosis);
- }
- if (highest_cvss >= 0)
- PRINT (out,
- "<detail>"
- "<name>prognosis</name>"
- "<value>%s</value>"
- "</detail>",
- cvss_threat (highest_cvss));
- }
-
+ PRINT (out,
+ "<detail>"
+ "<name>%s</name>"
+ "<value>%s</value>"
+ "<source>"
+ "<type>%s</type>"
+ "<name>%s</name>"
+ "<description>%s</description>"
+ "</source>"
+ "</detail>",
+ report_host_details_iterator_name (&details),
+ report_host_details_iterator_value (&details),
+ report_host_details_iterator_source_type (&details),
+ report_host_details_iterator_source_name (&details),
+ report_host_details_iterator_source_desc (&details));
cleanup_iterator (&details);
PRINT (out,
More information about the Openvas-commits
mailing list