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

Add --optimize add-/cleanup-feed-permissions #1612

Merged
merged 6 commits into from
Jul 28, 2021
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [20.8.3] (Unreleased)
### Added
- Add --optimize add-/cleanup-feed-permissions [#1612](https://github.com/greenbone/gvmd/pull/1612)

### Changed
- Use less report cache SQL when adding results [#1618](https://github.com/greenbone/gvmd/pull/1618)

Expand Down
18 changes: 18 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -355,13 +355,31 @@ supported values for `<name>` are:
For more information see the documentation for the `ANALYZE` command of the
database back-end you are using.

- `add-feed-permissions`

This option adds new read permissions on all feed data objects for the roles
defined in the "Feed Import Roles" setting if they do not exist.
The new permissions will be owned by the same user as the data objects,
usually the feed import owner.

This does not affect the command permissions, any permissions created for
users or groups, or other types of permissions like modify or delete.

- `cleanup-config-prefs`

This option removes duplicate preferences from Scan Configs and corrects
some broken preference values. For the latter, the NVT preferences in the
database must be up to date (if Manager and Scanner are both running, then
this should happen automatically).

- `cleanup-feed-permissions`

This option removes permissions on all feed data objects for all roles
that are not defined in the "Feed Import Roles" setting.

This does not affect the command permissions, any permissions created for
users or groups, or other types of permissions like modify or delete.

- `cleanup-port-names`

This cleans up the ports of results as stored in the database by removing
Expand Down
2 changes: 1 addition & 1 deletion doc/gvmd.8
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Modify user's password and exit.
Modify user's password and exit.
.TP
\fB--optimize=\fINAME\fB\f1
Run an optimization: vacuum, analyze, cleanup-config-prefs, cleanup-port-names, cleanup-report-formats, cleanup-result-nvts, cleanup-result-severities, cleanup-schedule-times, migrate-relay-sensors, rebuild-report-cache or update-report-cache.
Run an optimization: vacuum, add-feed-permissions, analyze, cleanup-config-prefs, cleanup-feed-permissions, cleanup-port-names, cleanup-report-formats, cleanup-result-nvts, cleanup-result-severities, cleanup-schedule-times, migrate-relay-sensors, rebuild-report-cache or update-report-cache.
.TP
\fB--osp-vt-update=\fISCANNER-SOCKET\fB\f1
Unix socket for OSP NVT update. Defaults to the path of the 'OpenVAS Default' scanner if it is an absolute path.
Expand Down
3 changes: 2 additions & 1 deletion doc/gvmd.8.xml
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<option>
<p><opt>--optimize=<arg>NAME</arg></opt></p>
<optdesc>
<p>Run an optimization: vacuum, analyze, cleanup-config-prefs,
<p>Run an optimization: vacuum, add-feed-permissions, analyze,
cleanup-config-prefs, cleanup-feed-permissions,
cleanup-port-names, cleanup-report-formats, cleanup-result-nvts,
cleanup-result-severities, cleanup-schedule-times,
migrate-relay-sensors, rebuild-report-cache
Expand Down
3 changes: 2 additions & 1 deletion doc/gvmd.html
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,8 @@ <h2>Options</h2>

<p><b>--optimize=<em>NAME</em></b></p>

<p>Run an optimization: vacuum, analyze, cleanup-config-prefs,
<p>Run an optimization: vacuum, analyze, add-feed-permissions,
cleanup-config-prefs, cleanup-feed-permissions,
cleanup-port-names, cleanup-report-formats, cleanup-result-nvts,
cleanup-result-severities, cleanup-schedule-times,
migrate-relay-sensors, rebuild-report-cache
Expand Down
3 changes: 2 additions & 1 deletion src/gvmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2017,7 +2017,8 @@ gvmd (int argc, char** argv)
"<password>" },
{ "optimize", '\0', 0, G_OPTION_ARG_STRING,
&optimize,
"Run an optimization: vacuum, analyze, cleanup-config-prefs,"
"Run an optimization: vacuum, analyze, add-feed-permissions,"
" cleanup-config-prefs, cleanup-feed-permissions,"
" cleanup-port-names, cleanup-report-formats, cleanup-result-encoding,"
" cleanup-result-nvts, cleanup-result-severities,"
" cleanup-schedule-times, migrate-relay-sensors,"
Expand Down
Loading