Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expect report format scripts to exit with code 0 #1383

Merged
merged 5 commits into from
Dec 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Clarify documentation for --scan-host parameter [#1277](https://github.com/greenbone/gvmd/pull/1277)
- In result iterator access severity directly if possible [#1321](https://github.com/greenbone/gvmd/pull/1321)
- Change SCAP and CERT data to use new severity scoring [#1333](https://github.com/greenbone/gvmd/pull/1333) [#1357](https://github.com/greenbone/gvmd/pull/1357) [#1365](https://github.com/greenbone/gvmd/pull/1365)
- Expect report format scripts to exit with code 0 [#1383](https://github.com/greenbone/gvmd/pull/1383)
- Send entire families to ospd-openvas using VT_GROUP [#1384](https://github.com/greenbone/gvmd/pull/1384)
- The internal list of current Local Security Checks for the 'Closed CVEs' feature was updated [#1381](https://github.com/greenbone/gvmd/pull/1381)

Expand Down
10 changes: 4 additions & 6 deletions src/manage_sql_report_formats.c
Original file line number Diff line number Diff line change
Expand Up @@ -3451,9 +3451,8 @@ run_report_format_script (gchar *report_format_id,
}

ret = system (command);
/* Ignore the shell command exit status, because we've not
* specified what it must be in the past. */
if (ret == -1)
/* Report scripts should return 0 since version 21.04 */
if (ret == -1 || WIFEXITED(ret) == 0 || WEXITSTATUS(ret))
{
g_warning ("%s (child):"
" system failed with ret %i, %i, %s",
Expand Down Expand Up @@ -3551,9 +3550,8 @@ run_report_format_script (gchar *report_format_id,
/* Just run the command as the current user. */

ret = system (command);
/* Ignore the shell command exit status, because we've not
* specified what it must be in the past. */
if (ret == -1)
/* Report scripts should return 0 since version 21.04 */
if (ret == -1 || WIFEXITED(ret) == 0 || WEXITSTATUS(ret))
{
g_warning ("%s: system failed with ret %i, %i, %s",
__func__,
Expand Down