Skip to content

Commit

Permalink
Merge pull request #916 from timopollmeier/nvti-tags-fix-9.0
Browse files Browse the repository at this point in the history
Add tags used for result NVTs to update_nvti_cache (9.0)
  • Loading branch information
mattmundell authored Dec 23, 2019
2 parents dd35144 + a83f777 commit be3a43d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Use right format specifier for merge_ovaldef version [#874](https://github.com/greenbone/gvmd/pull/874)
- Fix creation of "Super" permissions [#892](https://github.com/greenbone/gvmd/pull/892)
- Setup general task preferences to launch an osp openvas task. [#898](https://github.com/greenbone/gvmd/pull/898)
- 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)

### Removed
Expand Down
10 changes: 9 additions & 1 deletion src/manage_sql.c
Original file line number Diff line number Diff line change
Expand Up @@ -15732,7 +15732,10 @@ update_nvti_cache ()
nvti_cache = nvtis_new ();

init_iterator (&nvts,
"SELECT oid, name, family, cvss_base, tag, solution, solution_type FROM nvts;");
"SELECT oid, name, family, cvss_base, tag,"
" solution, solution_type, summary, insight, affected,"
" impact, detection"
" FROM nvts;");
while (next (&nvts))
{
iterator_t refs;
Expand All @@ -15745,6 +15748,11 @@ update_nvti_cache ()
nvti_set_tag (nvti, iterator_string (&nvts, 4));
nvti_set_solution (nvti, iterator_string (&nvts, 5));
nvti_set_solution_type (nvti, iterator_string (&nvts, 6));
nvti_set_summary (nvti, iterator_string (&nvts, 7));
nvti_set_insight (nvti, iterator_string (&nvts, 8));
nvti_set_affected (nvti, iterator_string (&nvts, 9));
nvti_set_impact (nvti, iterator_string (&nvts, 10));
nvti_set_detection (nvti, iterator_string (&nvts, 11));

init_iterator (&refs,
"SELECT type, ref_id, ref_text"
Expand Down

0 comments on commit be3a43d

Please sign in to comment.