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

Fix: Avoid DB check inserts in cleanup-sequences (backport #2328) #2330

Closed
wants to merge 3 commits into from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Nov 29, 2024

What

When running gvmd with the --optimize=cleanup-sequences option, the database checks during initialization will avoid most inserts. Setting database_version and max_hosts in the meta table now uses INSERT ... ON CONFLICT instead of deleting the previous entry.

Why

Skipping the inserts prevents the cleanup failing if one of the sequence has already run out of ids.
The change to the meta table update reduces the risk of the meta table id sequence running out.

References

GEA-576


This is an automatic backport of pull request #2328 done by [Mergify](https://mergify.com).

When running gvmd with the --optimize=cleanup-sequences option, the
database checks during initialization will avoid most inserts.
Setting database_version and max_hosts in the meta table now uses
INSERT ... ON CONFLICT instead of deleting the previous entry.

Skipping the inserts prevents the cleanup failing if one of the
sequence has already run out of ids.
The change to the meta table update reduces the risk of the meta table
id sequence running out.

(cherry picked from commit 705c6c2)
The new type "krb5" is added to the create_credential, modify_credential
and get_credentials commands.

This will later be usable in scan targets for Kerberos 5 authentication.

(cherry picked from commit 5bcc39e)
The new parameter has been added to the check_db_port_lists prototype
and various check_db_... functions that would only return if
the avoid_db_check_inserts parameter is true have the parameter removed
and are instead wrapped in if conditions.

(cherry picked from commit 5c0d5fa)
@mergify mergify bot requested a review from a team as a code owner November 29, 2024 09:02
Copy link

Conventional Commits Report

Type Number
Added 1
Bug Fixes 1

🚀 Conventional commits found.

@timopollmeier
Copy link
Member

We don't want to backport the Kerberos changes, so I'm closing this and I will create a manual backport without them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant