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

Scan prefs #557

Merged
merged 3 commits into from
Jul 20, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Move alive detection module (Boreas) into gvm-libs [#519](https://github.com/greenbone/openvas/pull/519)
- Allow to set all legal types of icmp v6 in icmp header in openvas-nasl. [#542](https://github.com/greenbone/openvas/pull/542)
- The output of the NASL dump_* packet forgery functions was made consistent. [#555](https://github.com/greenbone/openvas/pull/555)
- Make drop_privileges setting a scanner-only preference. [#557](https://github.com/greenbone/openvas/pull/557)

### Fixed
- Improve signal handling when update vhosts list. [#425](https://github.com/greenbone/openvas/pull/425)
Expand Down
4 changes: 4 additions & 0 deletions src/openvas.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,10 @@ load_scan_preferences (struct scan_globals *globals)

g_free (file_hash);
}
else if (is_scanner_only_pref (pref[0]))
g_warning ("%s is a scanner only preference. It can not be written "
"by the client and will be ignored.",
pref_name[0]);
else
prefs_set (pref[0], pref[1] ?: "");
g_strfreev (pref_name);
Expand Down
1 change: 1 addition & 0 deletions src/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ is_scanner_only_pref (const char *pref)
|| !strcmp (pref, "log_plugins_name_at_load")
|| !strcmp (pref, "nasl_no_signature_check")
|| !strcmp (pref, "vendor_version")
|| !strcmp (pref, "drop_privileges")
/* Preferences starting with sys_ are scanner-side only. */
|| !strncmp (pref, "sys_", 4))
return 1;
Expand Down