diff --git a/CHANGELOG.md b/CHANGELOG.md index aa4dba3c..fa6be5f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,20 +51,46 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). [21.4]: https://github.com/greenbone/ospd-openvas/compare/ospd-openvas-20.08...ospd-openvas-21.04 -## [20.8] +## [20.8.3] +### Added +### Changed +- Use better defaults for for ospd-openvas settings [#454](https://github.com/greenbone/ospd-openvas/pull/454) + +### Deprecated +### Removed +### Fixed + +[20.8.3]: https://github.com/greenbone/ospd-openvas/compare/v20.8.2...ospd-openvas-20.08 +## [20.8.2] - 2021-06-24 ### Added - Check for scanner error messages before leaving. [#395](https://github.com/greenbone/ospd-openvas/pull/395) -### Changed ### Fixed +- Don't crash with non-ascii chars in openvas.conf. [#381](https://github.com/greenbone/ospd-openvas/pull/381) -### Removed -- Remove methods handling the nvticache name. [#318](https://github.com/greenbone/ospd-openvas/pull/318) -- Remove py35 and py36 support. [#319](https://github.com/greenbone/ospd-openvas/pull/319) -- Remove globalscanid. [#326](https://github.com/greenbone/ospd-openvas/pull/326) +[20.8.2]: https://github.com/greenbone/ospd-openvas/compare/v20.8.1...v20.8.2 + +## [20.8.1] - 2021-02-01 + +### Added +- Add debug level log messages. [#373](https://github.com/greenbone/ospd-openvas/pull/373) + +### Changed +- Improve logging for unsatisfied vts dependencies. [#336](https://github.com/greenbone/ospd-openvas/pull/336) +- Do not use busy wait when waiting for the openvas scan process to finish. [#360](https://github.com/greenbone/ospd-openvas/pull/360) +- The description field of the systemd ospd-openvas.service file was updated. [#372](https://github.com/greenbone/ospd-openvas/pull/372) +- Improve logging for unexpected data in script_xref tags. [#374](https://github.com/greenbone/ospd-openvas/pull/374) + +### Fixed +- Fix nvticache name for stable version from sources. [#317](https://github.com/greenbone/ospd-openvas/pull/317) +- Fix stop scan during preferences handling, before spawning OpenVAS. [#332](https://github.com/greenbone/ospd-openvas/pull/332) +- Fix alive test preferences when a non default method is selected. [#334](https://github.com/greenbone/ospd-openvas/pull/334) +- Check for empty vts preferences list. [#340](https://github.com/greenbone/ospd-openvas/pull/340) +- Fix progress calculation when the host count differs from the target string count. [#343](https://github.com/greenbone/ospd-openvas/pull/343) +- Retry host progress update if the progress is still below 100 percent. [#390](https://github.com/greenbone/ospd-openvas/pull/390) -[20.8]: https://github.com/greenbone/ospd-openvas/compare/v20.08.1...ospd-openvas-20.08 +[20.8.1]: https://github.com/greenbone/ospd-openvas/compare/v20.8.0...v20.8.1 ## [20.8.1] (2021-02-01) diff --git a/config/ospd-openvas.conf b/config/ospd-openvas.conf new file mode 100644 index 00000000..57adfd86 --- /dev/null +++ b/config/ospd-openvas.conf @@ -0,0 +1,7 @@ +[OSPD - openvas] +log_level = INFO +socket_mode = 0o770 +unix_socket = /run/ospd/ospd-openvas.sock +pid_file = /run/ospd/ospd-openvas.pid +log_file = /var/log/gvm/ospd-openvas.log +lock_file_dir = /var/lib/openvas diff --git a/config/ospd-openvas.default b/config/ospd-openvas.default deleted file mode 100644 index 35e7b871..00000000 --- a/config/ospd-openvas.default +++ /dev/null @@ -1,25 +0,0 @@ -# -# The installation prefix to find the ospd-openvas binary. -# -PATH=/bin:/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:$PATH -PYTHONPATH=/lib/python3.5/site-packages:$PYTHONPATH - -# -# The user for running the OSPD OpenVAS daemon in the ospd-openvas.service systemd file -# -OSPD_OPENVAS_USER="gvm" - -# -# The group for running the OSPD OpenVAS daemon in the ospd-openvas.service systemd file -# -OSPD_OPENVAS_GROUP="gvm" - -# -# The location of the OSPD OpenVAS daemon PID file -# -OSPD_OPENVAS_PID="/var/run/ospd/ospd-openvas.pid" - -# -# Additional default parameters -# -OSPD_OPENVAS_ARGS="--unix-socket /var/run/ospd/ospd-openvas.sock --pid-file $OSPD_OPENVAS_PID --log-file /var/log/gvm/ospd-openvas.log --lock-file-dir /var/run" diff --git a/config/ospd-openvas.service b/config/ospd-openvas.service index 0f21c783..6fa57b6f 100644 --- a/config/ospd-openvas.service +++ b/config/ospd-openvas.service @@ -1,5 +1,5 @@ [Unit] -Description=OpenVAS Wrapper of the Greenbone Vulnerability Management (ospd-openvas) +Description=OSPd Wrapper for the OpenVAS Scanner (ospd-openvas) Documentation=man:ospd-openvas(8) man:openvas(8) After=network.target networking.service redis-server@openvas.service Wants=redis-server@openvas.service @@ -7,15 +7,13 @@ ConditionKernelCommandLine=!recovery [Service] Type=forking -EnvironmentFile=/etc/default/ospd-openvas.default -Environment="PATH=$PATH" -Environment="PYTHONPATH=$PYTHONPATH" -User=$OSPD_OPENVAS_USER -Group=$OSPD_OPENVAS_GROUP -PIDFile=$OSPD_OPENVAS_PID -ExecStart=/bin/ospd-openvas $OSPD_OPENVAS_ARGS +User=gvm +Group=gvm +RuntimeDirectory=ospd +RuntimeDirectoryMode=2775 +PIDFile=/run/ospd/ospd-openvas.pid +ExecStart=/usr/local/bin/ospd-openvas --config /etc/gvm/ospd-openvas.conf --log-config /etc/gvm/ospd-logging.conf SuccessExitStatus=SIGKILL -# This works asynchronously, but does not take the daemon down during the reload so it's ok. Restart=always RestartSec=60 diff --git a/config/ospd.conf b/config/ospd.conf deleted file mode 100644 index b58b4031..00000000 --- a/config/ospd.conf +++ /dev/null @@ -1,7 +0,0 @@ -[OSPD - openvas] -log_level = INFO -socket_mode = 0o770 -unix_socket = /var/run/ospd/ospd-openvas.sock -pid_file = /var/run/ospd/ospd-openvas.pid -log_file = /var/log/gvm/ospd-openvas.log -lock_file_dir = /var/run diff --git a/ospd_openvas/daemon.py b/ospd_openvas/daemon.py index b0c18815..951cfc09 100644 --- a/ospd_openvas/daemon.py +++ b/ospd_openvas/daemon.py @@ -425,7 +425,7 @@ class OSPDopenvas(OSPDaemon): """Class for ospd-openvas daemon.""" def __init__( - self, *, niceness=None, lock_file_dir='/var/run/ospd', **kwargs + self, *, niceness=None, lock_file_dir='/var/lib/openvas', **kwargs ): """Initializes the ospd-openvas daemon's internal data.""" self.main_db = MainDB() diff --git a/pyproject.toml b/pyproject.toml index c8c1c0e7..59d29a6f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,9 +30,8 @@ keywords = [ packages = [ { include = "ospd_openvas"}, { include = "docs/ospd-openvas.8", format = "sdist"}, - { include = "config/ospd-openvas.default", format = "sdist"}, { include = "config/ospd-openvas.service", format = "sdist"}, - { include = "config/ospd.conf", format = "sdist"}, + { include = "config/ospd-openvas.conf", format = "sdist"}, { include = "tests", format = "sdist" }, { include = "CHANGELOG.md", format = "sdist"}, { include = "COPYING", format = "sdist"},