Skip to content

Commit

Permalink
Fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
jjnicola committed Aug 9, 2021
1 parent 5fa9b27 commit 799d443
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 91 deletions.
64 changes: 1 addition & 63 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,70 +4,7 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

<<<<<<< HEAD
=======
## [21.4.3] - Unreleased
### Added
### Changed
### Deprecated
### Removed
### Fixed
Fix interrupted scan, when the process table is full. [#832](https://github.com/greenbone/openvas-scanner/pull/832)

[21.4.3]: https://github.com/greenbone/openvas-scanner/compare/v21.4.2...gvmd-21.04

## [21.4.2] - 2021-08-03
### Fixed
- Fix clang-analyzer warnings.
[#791](https://github.com/greenbone/openvas/pull/791)
[#795](https://github.com/greenbone/openvas/pull/795)

[21.4.2]: https://github.com/greenbone/openvas-scanner/compare/v21.4.1...v21.4.2


## [21.4.1] - 2021-06-23

### Added
- Improve nasl linter to catch more cases of undeclared variables. [#728](https://github.com/greenbone/openvas-scanner/pull/728)
- Add deprecation warning for source_iface related settings which will be removed with the 21.10 release. [#732](https://github.com/greenbone/openvas-scanner/pull/732)
- New Credentials for SSH to get su privileges. Backport of [#744](https://github.com/greenbone/openvas-scanner/pull/744). [#753](https://github.com/greenbone/openvas-scanner/pull/753)

### Changed
- Update default log config [#711](https://github.com/greenbone/openvas-scanner/pull/711)

### Fixed
- Use host from the original hosts list when boreas is enabled. [#725](https://github.com/greenbone/openvas/pull/725)
- Initialize the the kb to store results for openvas-nasl [#735](https://github.com/greenbone/openvas/pull/735)
- Fix unittest. Mock kb_lnk_reset. [#748](https://github.com/greenbone/openvas/pull/748)

[21.4.1]: https://github.com/greenbone/openvas/compare/v21.4.0...v21.4.1

## [21.4.0] - 2021-04-15

### Added
- Add scanner-only option to enable tls debugging. [#558](https://github.com/greenbone/openvas/pull/558)
- Extend nasl lint to detect if function parameter is used twice. [#585](https://github.com/greenbone/openvas/pull/585)
- Add option to specify if a host can be scanned through its IPv4 and IPv6 in parallel.
[#604](https://github.com/greenbone/openvas/pull/604)
[#645](https://github.com/greenbone/openvas/pull/645)
- Add insert_tcp_options and insert_tcp_v6_options nasl functions. [#618](https://github.com/greenbone/openvas/pull/618)
- Add get_tcp_option and extend dump_tcp_packet nasl functions. [#621](https://github.com/greenbone/openvas/pull/621)
- Add new scanner only option for spawning NASL functions with a different owner. [#634](https://github.com/greenbone/openvas/pull/634)
- Add debug logs for allow_simultaneous_ips=no. [#685](https://github.com/greenbone/openvas/pull/685)
- Add min_free_mem and max_sysload scanner only options. [#690](https://github.com/greenbone/openvas/pull/690)

### Changed
- Store results in main_kb instead of host_kb. [#550](https://github.com/greenbone/openvas/pull/550)
- Also use internal function name in some nasl log messages. [#611](https://github.com/greenbone/openvas/pull/611)
- Move more scanner preferences to gvm-libs to make them available for openvas-nasl. [#614](https://github.com/greenbone/openvas/pull/614)

### Removed
- Use the nvticache name from gvm-libs, defined in nvticache.h. [#578](https://github.com/greenbone/openvas/pull/578)

[21.4.0]: https://github.com/greenbone/openvas/compare/openvas-20.08...v21.4.0


>>>>>>> 0dbce72d (Add Changelog and fix format.)
## [20.8.4] (unreleased)
### Added
### Changed
Expand All @@ -80,6 +17,7 @@ Fix interrupted scan, when the process table is full. [#832](https://github.com/
### Deprecated
### Removed
### Fixed
Backport #832. Fix interrupted scan, when the process table is full. [#835](https://github.com/greenbone/openvas-scanner/pull/835)

[20.8.4]: https://github.com/greenbone/openvas-scanner/compare/v20.8.3...openvas-20.08

Expand Down
8 changes: 1 addition & 7 deletions src/attack.c
Original file line number Diff line number Diff line change
Expand Up @@ -426,15 +426,9 @@ launch_plugin (struct scan_globals *globals, struct scheduler_plugin *plugin,

/* Update vhosts list and start the plugin */
check_new_vhosts ();
<<<<<<< HEAD
pid = plugin_launch (globals, plugin, ip, vhosts, kb, nvti);
if (pid < 0)
=======
launch_error = 0;
pid = plugin_launch (globals, plugin, ip, vhosts, kb, main_kb, nvti,
&launch_error);
pid = plugin_launch (globals, plugin, ip, vhosts, kb, nvti, &launch_error);
if (launch_error == ERR_NO_FREE_SLOT || launch_error == ERR_CANT_FORK)
>>>>>>> b43156e8 (Improve error handling for plugin_launch.)
{
plugin->running_state = PLUGIN_STATUS_UNRUN;
ret = launch_error;
Expand Down
27 changes: 6 additions & 21 deletions src/pluginlaunch.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,12 +348,8 @@ plugin_timeout (nvti_t *nvti)
*/
int
plugin_launch (struct scan_globals *globals, struct scheduler_plugin *plugin,
<<<<<<< HEAD
struct in6_addr *ip, GSList *vhosts, kb_t kb, nvti_t *nvti)
=======
struct in6_addr *ip, GSList *vhosts, kb_t kb, kb_t main_kb,
nvti_t *nvti, int *error)
>>>>>>> b43156e8 (Improve error handling for plugin_launch.)
struct in6_addr *ip, GSList *vhosts, kb_t kb, nvti_t *nvti,
int *error)
{
int p;

Expand Down Expand Up @@ -428,27 +424,16 @@ pluginlaunch_wait_for_free_process (kb_t kb)
update_running_processes (kb);
/* Max number of processes are still running, wait for a child to exit or
* to timeout. */
<<<<<<< HEAD
<<<<<<< HEAD
if (num_running_processes == max_running_processes)
=======
=======

if (num_running_processes >= max_running_processes)
g_debug ("%s. Number of running processes >= maximum running processes (%d "
">= %d). "
"Waiting for free slot for processes.",
__func__, num_running_processes, max_running_processes);

>>>>>>> 17b38c08 (Add a debug message for this especial case.)
while (
(num_running_processes >= max_running_processes)
|| (num_running_processes > 0 && (check_memory () || check_sysload ())))
>>>>>>> dd3e46dd (Check if the max running process was reached or even exceed.)
{
sigset_t mask;
struct timespec ts = {0, 0};

g_debug ("%s. Number of running processes >= maximum running processes "
"(%d >= %d). Waiting for free slot for processes.",
__func__, num_running_processes, max_running_processes);

ts.tv_sec = timeout_running_processes ();
assert (ts.tv_sec);
sigemptyset (&mask);
Expand Down

0 comments on commit 799d443

Please sign in to comment.