greenbone / openvas-scanner

This repository contains the scanner component for Greenbone Community Edition.
https://greenbone.github.io/docs/
GNU General Public License v2.0
3.37k stars 621 forks source link

When use cmd openvas -u, the logger_mutex's value is still NULL #960

Closed zhulu323 closed 2 years ago

zhulu323 commented 2 years ago

Expected behavior

In function create_process ,called gvm_log_lock,the logger_mutex should be inited! This is happen when just use cmd openvas -u

Actual behavior

When use cmd openvas -u, the logger_mutex's value is still NULL, Need call gvm_log_lock_init(), before create_process(),enev if there is not the file openvas_log.conf。

init_openvas (const char *config_file)-->setup_log_handlers (log_config)-->gvm_log_func()-->gvm_log_lock_init()

Steps to reproduce

  1. Delete the log config file, openvas_log.conf
  2. Run command "openvas -u",

GVM versions

gsa: (gsad --version)

gvm: (gvmd --version)

openvas: (openvas --version) OpenVAS 21.4.2~dev1 gvm-libs: gvm-libs 21.4.2~dev1 openvas-smb:

ospd-openvas: (ospd-openvas --version)

Environment

Operating system:

Installation method / source: (packages, source installation)

Logfiles

immauss commented 2 years ago

@ArnoStiefvater Shouldn't it also be looking for the config in in /usr/local/etc vs /etc ?

ArnoStiefvater commented 2 years ago

Closing as this was already fixed long ago and clarified in https://github.com/greenbone/openvas-scanner/issues/963 Thanks a lot for reporting this issue!