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

[7.0] Check if another forked child has already added the vhost. #584

Merged
merged 5 commits into from
Aug 20, 2020
Merged

[7.0] Check if another forked child has already added the vhost. #584

merged 5 commits into from
Aug 20, 2020

Conversation

cfi-gb
Copy link
Member

@cfi-gb cfi-gb commented Aug 20, 2020

Backport of #581 to the openvas-7.0 branch.

In some cases, in which expand_vhosts and test_empty_vhost options
are enabled, a plugin process fork()s one child for vhost.
These children inherit the current state of vhosts list, but it does not
check if the concurrent child plugin has already added a new found vhost.
Now, it checks not only if the vhost has been added by another plugin before
(and already exists in the vhosts list), but also checks if a concurrent child
added to the internal/vhosts key in redis.
Like the previous commit, but this check is done at host process level,
It does not removes the appended vhosts from internal/vhosts key (get instead pop)
So, avoids race condition in which other plugins checks for adding the same vhosts,
and they have an outdated vhosts list.
@cfi-gb cfi-gb requested a review from a team August 20, 2020 11:36
@jjnicola jjnicola merged commit 1f7e6c1 into greenbone:openvas-7.0 Aug 20, 2020
@cfi-gb cfi-gb deleted the 581_backport_7.0 branch August 20, 2020 13:14
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