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

Store and get the script timeout as preference #844

Merged
merged 7 commits into from
Oct 19, 2021

Conversation

jjnicola
Copy link
Member

@jjnicola jjnicola commented Aug 18, 2021

Depends on greenbone/gvm-libs#581
What:
Store and get the script timeout as preference

[middleware branch] All related PRs:

[master branch] All related PRs:

Why:
The script timeout is now handle as preference and it is stored as another preference, but always with the ID 0.

How:
Use an up to date build of middleware from gvmd (send the script preference) and gvm-libs (handle timeout as preference)
Set a timeout to 1second for a script in gsa, one which runs for a long time (find_service.nasl). Run the scanner. Check that the script timeouts. You can check this with "log_whole_attack = yes"

A redis flushall() is required, since it is a change in the redis nvticache and all plugins must be loaded up again.

Checklist:

get_plugin_prefrence() already checks first for preferences set by the client, if not found
get the default from redis.
The id 0 was not handled because it was reserved for the timeout, stored in other place with another format.
Now, the timeout is handle as plugin preference and can be handled via its ID.
Although, ID 0 is still reserved for the timeout plugin preference.
@jjnicola jjnicola marked this pull request as ready for review October 15, 2021 08:28
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.

2 participants