Skip to content

Commit

Permalink
Merge pull request #967 from timopollmeier/gvmd-9.0-into-master
Browse files Browse the repository at this point in the history
Merge gvmd-9.0 changes into master
  • Loading branch information
mattmundell authored Feb 3, 2020
2 parents 578e1ce + 99d163f commit 1762bcc
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Add tags used for result NVTs to update_nvti_cache [#916](https://github.com/greenbone/gvmd/pull/916)
- Apply usage_type of tasks in get_aggregates (9.0) [#912](https://github.com/greenbone/gvmd/pull/912)
- Add target's alive test method before starting a scan. [#947](https://github.com/greenbone/gvmd/pull/947)
- Set run status only after getting OSP-OpenVAS scan [#948](https://github.com/greenbone/gvmd/pull/948) [#951](https://github.com/greenbone/gvmd/pull/951)
- Fix get_system_reports for GMP scanners [#949](https://github.com/greenbone/gvmd/pull/949)
- Fix QoD handling in nvti cache and test_alert [#954](https://github.com/greenbone/gvmd/pull/954)
- Use stop_osp_task for SCANNER_TYPE_OSP_SENSOR [#955](https://github.com/greenbone/gvmd/pull/955)
- Add target's reverse_lookup_* options [#959](https://github.com/greenbone/gvmd/pull/959)
- Fix "Start Task" alerts by using alert owner [#957](https://github.com/greenbone/gvmd/pull/957)
- Fix Verinice ISM report format and update version [#961](https://github.com/greenbone/gvmd/pull/961)
- Fix Verinice ISM report format and update version [#962](https://github.com/greenbone/gvmd/pull/962)
- Always use details testing alerts with a report [#964](https://github.com/greenbone/gvmd/pull/964)
- Remove extra XML declaration in Anonymous XML [#965](https://github.com/greenbone/gvmd/pull/965)

### Removed
- Remove support for "All SecInfo": removal of "allinfo" for type in get_info [#790](https://github.com/greenbone/gvmd/pull/790)
Expand Down
4 changes: 4 additions & 0 deletions src/gmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -14940,6 +14940,10 @@ handle_get_reports (gmp_parser_t *gmp_parser, GError **error)
if (request_report)
cleanup_iterator (&reports);

/* Always enable details when using a report to test an alert. */
if (get_reports_data->alert_id)
get_reports_data->get.details = 1;

ret = manage_send_report (report,
delta_report,
report_format,
Expand Down
18 changes: 13 additions & 5 deletions src/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -3565,13 +3565,15 @@ handle_osp_scan (task_t task, report_t report, const char *scan_id)
char *host, *ca_pub, *key_pub, *key_priv;
int rc, port;
scanner_t scanner;
gboolean started;

scanner = task_scanner (task);
host = scanner_host (scanner);
port = scanner_port (scanner);
ca_pub = scanner_ca_pub (scanner);
key_pub = scanner_key_pub (scanner);
key_priv = scanner_key_priv (scanner);
started = FALSE;

while (1)
{
Expand Down Expand Up @@ -3647,6 +3649,14 @@ handle_osp_scan (task_t task, report_t report, const char *scan_id)
rc = 0;
break;
}
else if (osp_scan_status == OSP_SCAN_STATUS_RUNNING
&& started == FALSE)
{
set_task_run_status (task, TASK_STATUS_RUNNING);
set_report_scan_run_status (global_current_report,
TASK_STATUS_RUNNING);
started = TRUE;
}
}
}
}
Expand Down Expand Up @@ -4456,9 +4466,6 @@ fork_osp_scan_handler (task_t task, target_t target, int from,
exit (-1);
}

set_task_run_status (task, TASK_STATUS_RUNNING);
set_report_scan_run_status (global_current_report, TASK_STATUS_RUNNING);

snprintf (title, sizeof (title), "gvmd: OSP: Handling scan %s", report_id);
proctitle_set (title);

Expand Down Expand Up @@ -5724,7 +5731,8 @@ stop_task (const char *task_id)
return 3;

if (scanner_type (task_scanner (task)) == SCANNER_TYPE_OPENVAS
|| scanner_type (task_scanner (task)) == SCANNER_TYPE_OSP)
|| scanner_type (task_scanner (task)) == SCANNER_TYPE_OSP
|| scanner_type (task_scanner (task)) == SCANNER_TYPE_OSP_SENSOR)
return stop_osp_task (task);

return stop_task_internal (task);
Expand Down Expand Up @@ -6164,13 +6172,13 @@ get_system_report_types (const char *required_type, gchar ***start,
scanner_type_t slave_type;

slave = 0;
slave_type = SCANNER_TYPE_NONE;

if (find_scanner_with_permission (slave_id, &slave, "get_scanners"))
return -1;
if (slave == 0)
return 2;

slave_type = scanner_type (slave);
if (slave_type == SCANNER_TYPE_GMP)
return get_slave_system_report_types (required_type, start, types,
slave);
Expand Down
1 change: 1 addition & 0 deletions src/report_formats/Anonymous_XML/Anonymous_XML.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
extension-element-prefixes="str date func gvm exslt">
<xsl:output method="xml"
indent="yes"
omit-xml-declaration="yes"
encoding="UTF-8" />

<!--
Expand Down

0 comments on commit 1762bcc

Please sign in to comment.