Skip to content

Commit

Permalink
Merge branch 'master' into extend_gmp_for_escalation_credential
Browse files Browse the repository at this point in the history
  • Loading branch information
timopollmeier authored May 28, 2021
2 parents dca05f3 + f92cbc9 commit 4243819
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 8 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [21.4.1] (unreleased)

### Added
- Add NVT tag "deprecated" [#1536](https://github.com/greenbone/gvmd/pull/1536)

### Fixed
- Improve VT version handling for CVE & OVAL results [#1496](https://github.com/greenbone/gvmd/pull/1496)
- Update subject alternative name in certificate generation [#1503](https://github.com/greenbone/gvmd/pull/1503)
- Fix whole-only config family selection [#1517](https://github.com/greenbone/gvmd/pull/1517)
- Migrate GMP Scanners to OSP Sensors [#1533](https://github.com/greenbone/gvmd/pull/1533)

[21.4.0]: https://github.com/greenbone/gvmd/compare/v21.4.0...gvmd-21.04

Expand Down Expand Up @@ -111,6 +115,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Fix "not regexp ..." filters [#1482](https://github.com/greenbone/gvmd/pull/1482)
- Escape TLS certificate DNs that are invalid UTF-8 [#1486](https://github.com/greenbone/gvmd/pull/1486)
- Free alert get data in report_content_for_alert [#1526](https://github.com/greenbone/gvmd/pull/1526)
- Fix erroneous freeing of ical timezone component [#1530](https://github.com/greenbone/gvmd/pull/1530)

### Removed

Expand Down
6 changes: 3 additions & 3 deletions src/manage_migrators.c
Original file line number Diff line number Diff line change
Expand Up @@ -2342,9 +2342,9 @@ migrate_233_to_234 ()
" DROP column slave_host,"
" DROP column slave_port;");

/* Convert existing GMP Scanners to OSP Scanners. */
sql ("UPDATE scanners SET type = 2 WHERE type = 4;");
sql ("UPDATE scanners_trash SET type = 2 WHERE type = 4;");
/* Convert existing GMP Scanners to OSP Sensors. */
sql ("UPDATE scanners SET type = 5 WHERE type = 4;");
sql ("UPDATE scanners_trash SET type = 5 WHERE type = 4;");

/* Set the database version to 234. */

Expand Down
8 changes: 7 additions & 1 deletion src/manage_sql_nvts.c
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,7 @@ nvti_from_vt (entity_t vt)
const char *id;
entity_t name, summary, insight, affected, impact, detection, solution;
entity_t creation_time, modification_time;
entity_t refs, ref, custom, family, category;
entity_t refs, ref, custom, family, category, deprecated;
entity_t severities, severity;

entities_t children;
Expand Down Expand Up @@ -1468,6 +1468,12 @@ nvti_from_vt (entity_t vt)
}
nvti_set_category (nvti, atoi (entity_text (category)));

deprecated = entity_child (custom, "deprecated");
if (deprecated)
{
nvti_add_tag (nvti, "deprecated", entity_text (deprecated));
}

return nvti;
}

Expand Down
6 changes: 4 additions & 2 deletions src/manage_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ icalcomponent *
icalendar_from_string (const char *ical_string, icaltimezone *zone,
gchar **error)
{
icalcomponent *ical_new, *ical_parsed;
icalcomponent *ical_new, *ical_parsed, *timezone_component;
icalproperty *error_prop;
GString *warnings_buffer;
int vevent_count = 0;
Expand Down Expand Up @@ -727,7 +727,9 @@ icalendar_from_string (const char *ical_string, icaltimezone *zone,
icalcomponent_add_property (ical_new,
icalproperty_new_prodid (GVM_PRODID));

icalcomponent_add_component (ical_new, icaltimezone_get_component (zone));
timezone_component
= icalcomponent_new_clone (icaltimezone_get_component (zone));
icalcomponent_add_component (ical_new, timezone_component);

switch (icalcomponent_isa (ical_parsed))
{
Expand Down
4 changes: 2 additions & 2 deletions src/sql.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
*/
#define G_LOG_DOMAIN "md manage"
/**
* @brief amount of ms sql should wait before retrying when a deadlock occured
* @brief amount of ms sql should wait before retrying when a deadlock occurred
*/
#define DEADLOCK_SLEEP 1000

Expand Down Expand Up @@ -284,7 +284,7 @@ sql (char* sql, ...)
{
if (deadlock_amount++ > DEADLOCK_THRESHOLD)
{
g_warning("%s: %d deadlocks detected, wating and retrying %s", __func__, deadlock_amount, sql);
g_warning("%s: %d deadlocks detected, waiting and retrying %s", __func__, deadlock_amount, sql);
}
gvm_usleep (DEADLOCK_SLEEP);
continue;
Expand Down

0 comments on commit 4243819

Please sign in to comment.