diff options
Diffstat (limited to 'net-analyzer/openvas-scanner/files')
9 files changed, 0 insertions, 297 deletions
diff --git a/net-analyzer/openvas-scanner/files/openvas-scanner-5.1.3-cachedir.patch b/net-analyzer/openvas-scanner/files/openvas-scanner-5.1.3-cachedir.patch deleted file mode 100644 index 98c657250197..000000000000 --- a/net-analyzer/openvas-scanner/files/openvas-scanner-5.1.3-cachedir.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- openvas-scanner-5.1.3/src/openvassd.c 2018-08-29 19:27:26.000000000 +0300 -+++ openvas-scanner-5.1.3/src/openvassd.c 2019-02-04 03:28:24.635539266 +0300 -@@ -103,7 +103,6 @@ - */ - static openvassd_option openvassd_defaults[] = { - {"plugins_folder", OPENVAS_NVT_DIR}, -- {"cache_folder", OPENVAS_CACHE_DIR}, - {"include_folders", OPENVAS_NVT_DIR}, - {"max_hosts", "30"}, - {"max_checks", "10"}, ---- openvas-scanner-5.1.3/src/CMakeLists.txt 2018-08-29 19:27:26.000000000 +0300 -+++ openvas-scanner-5.1.3/src/CMakeLists.txt 2019-02-04 03:22:20.078824664 +0300 -@@ -68,10 +68,6 @@ - add_definitions (-DOPENVAS_NVT_DIR=\\\"${OPENVAS_NVT_DIR}\\\") - endif (OPENVAS_NVT_DIR) - --if (OPENVAS_CACHE_DIR) -- add_definitions (-DOPENVAS_CACHE_DIR=\\\"${OPENVAS_CACHE_DIR}\\\") --endif (OPENVAS_CACHE_DIR) -- - if (OPENVAS_LOG_DIR) - add_definitions (-DOPENVAS_LOG_DIR=\\\"${OPENVAS_LOG_DIR}\\\") - endif (OPENVAS_LOG_DIR) ---- openvas-scanner-5.1.3/CMakeLists.txt 2018-08-29 19:27:26.000000000 +0300 -+++ openvas-scanner-5.1.3/CMakeLists.txt 2019-02-04 03:18:37.889999639 +0300 -@@ -166,7 +166,6 @@ - set (OPENVAS_DATA_DIR "${DATADIR}/openvas") - set (OPENVAS_STATE_DIR "${LOCALSTATEDIR}/lib/openvas") - set (OPENVAS_LOG_DIR "${LOCALSTATEDIR}/log/openvas") --set (OPENVAS_CACHE_DIR "${LOCALSTATEDIR}/cache/openvas") - set (OPENVAS_SYSCONF_DIR "${SYSCONFDIR}/openvas") - - if (NOT OPENVAS_NVT_DIR) -@@ -265,7 +264,6 @@ - DESTINATION ${DATADIR}/doc/openvas-scanner/ ) - - install (DIRECTORY DESTINATION ${OPENVAS_NVT_DIR}) --install (DIRECTORY DESTINATION ${OPENVAS_CACHE_DIR}) - - ## Tests - - diff --git a/net-analyzer/openvas-scanner/files/openvas-scanner-5.1.3-gcc8.patch b/net-analyzer/openvas-scanner/files/openvas-scanner-5.1.3-gcc8.patch deleted file mode 100644 index 4ec2e786e125..000000000000 --- a/net-analyzer/openvas-scanner/files/openvas-scanner-5.1.3-gcc8.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- openvas-scanner-5.1.3/src/ntp.c 2018-08-29 19:27:26.000000000 +0300 -+++ openvas-scanner-5.1.3/src/ntp.c 2019-02-02 00:57:56.832878754 +0300 -@@ -361,9 +361,7 @@ - } - - /*---------------------------------------------------------- -- - Communication protocol: timestamps -- - ----------------------------------------------------------*/ - - -@@ -391,7 +389,7 @@ - static int - __ntp_timestamp_scan_host (int soc, char *msg, char *host) - { -- char timestr[1024]; -+ char timestr[64]; - char *tmp; - time_t t; - int len; ---- openvas-scanner-5.1.3/src/pluginload.c 2018-08-29 19:27:26.000000000 +0300 -+++ openvas-scanner-5.1.3/src/pluginload.c 2019-02-02 00:59:24.494774959 +0300 -@@ -250,7 +250,7 @@ - g_slist_free_full (oids, g_free); - } - --static int -+static void - plugins_reload_from_dir (void *folder) - { - GSList *files = NULL, *f; ---- openvas-scanner-5.1.3/src/processes.h 2018-08-29 19:27:26.000000000 +0300 -+++ openvas-scanner-5.1.3/src/processes.h 2019-02-02 01:06:42.772908314 +0300 -@@ -28,7 +28,7 @@ - #ifndef _OPENVAS_THREADS_H - #define _OPENVAS_THREADS_H - --typedef int (*process_func_t) (void *); -+typedef void (*process_func_t) (void *); - pid_t create_process (process_func_t, void *); - int terminate_process (pid_t); diff --git a/net-analyzer/openvas-scanner/files/openvas-scanner-5.1.3-nvt.patch b/net-analyzer/openvas-scanner/files/openvas-scanner-5.1.3-nvt.patch deleted file mode 100644 index 67091fcf3e3b..000000000000 --- a/net-analyzer/openvas-scanner/files/openvas-scanner-5.1.3-nvt.patch +++ /dev/null @@ -1,93 +0,0 @@ ---- openvas-scanner-5.1.3/src/attack.c 2018-08-29 19:27:26.000000000 +0300 -+++ openvas-scanner-5.1.3/src/attack.c 2019-02-02 00:44:12.834888067 +0300 -@@ -97,9 +97,7 @@ - }; - - /******************************************************* -- - PRIVATE FUNCTIONS -- - ********************************************************/ - - /** -@@ -996,6 +994,14 @@ - sched = plugins_scheduler_init - (prefs_get ("plugin_set"), prefs_get_bool ("auto_enable_dependencies"), - network_phase); -+ if (sched == NULL) -+ { -+ error_message_to_client (global_socket, -+ "Failed to initialize the plugins scheduler.", -+ NULL, NULL); -+ return; -+ } -+ - - max_hosts = get_max_hosts_number (); - max_checks = get_max_checks_number (); ---- openvas-scanner-5.1.3/src/pluginscheduler.c 2018-08-29 19:27:26.000000000 +0300 -+++ openvas-scanner-5.1.3/src/pluginscheduler.c 2019-02-02 00:48:03.799598381 +0300 -@@ -486,7 +486,7 @@ - } - } - --static void -+static int - plugins_scheduler_fill (plugins_scheduler_t sched) - { - int i; -@@ -500,6 +500,15 @@ - int category; - - category = nvticache_get_category (element->data); -+ if (category < 0) -+ { -+ log_write ("The NVT with oid %s has not category assigned. This is " -+ "considered a fatal error, since the NVTI Cache " -+ "structure stored in Redis is out dated or corrupted.", -+ (char *) element->data); -+ g_slist_free_full (list, g_free); -+ return 1; -+ } - scheduler_plugin = g_malloc0 (sizeof (struct scheduler_plugin)); - scheduler_plugin->running_state = PLUGIN_STATUS_UNRUN; - scheduler_plugin->oid = g_strdup (element->data); -@@ -529,6 +538,7 @@ - } - } - -+ return 0; - } - - plugins_scheduler_t -@@ -540,7 +550,11 @@ - /* Fill our lists */ - ret = g_malloc0 (sizeof (*ret)); - ret->hash = hash_init (); -- plugins_scheduler_fill (ret); -+ if (plugins_scheduler_fill (ret)) -+ { -+ plugins_scheduler_free (ret); -+ return NULL; -+ } - - plugins_scheduler_enable (ret, plugins_list, autoload); - -@@ -729,9 +743,12 @@ - void - plugins_scheduler_free (plugins_scheduler_t sched) - { -- int i; -- hash_destroy (sched->hash); -- for (i = ACT_FIRST; i <= ACT_LAST; i++) -- list_destroy (sched->list[i]); -- g_free (sched); -+ if (sched) -+ { -+ int i; -+ hash_destroy (sched->hash); -+ for (i = ACT_FIRST; i <= ACT_LAST; i++) -+ list_destroy (sched->list[i]); -+ g_free (sched); -+ } - } diff --git a/net-analyzer/openvas-scanner/files/openvas-scanner-daemon.conf b/net-analyzer/openvas-scanner/files/openvas-scanner-daemon.conf deleted file mode 100644 index f14b5aae6f12..000000000000 --- a/net-analyzer/openvas-scanner/files/openvas-scanner-daemon.conf +++ /dev/null @@ -1,9 +0,0 @@ -# OpenVAS Scanner command args - -# e.g --foreground -OPENVAS_SCANNER_OPTIONS="" - -# Scanner listen socket -OPENVAS_SCANNER_LISTEN_SOCKET="--unix-socket=/var/run/openvassd.sock" - - diff --git a/net-analyzer/openvas-scanner/files/openvas-scanner.init b/net-analyzer/openvas-scanner/files/openvas-scanner.init deleted file mode 100644 index 757b5801f29b..000000000000 --- a/net-analyzer/openvas-scanner/files/openvas-scanner.init +++ /dev/null @@ -1,25 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -name="OpenVAS Scanner" -command="/usr/sbin/openvassd" -command_args="${OPENVAS_SCANNER_OPTIONS} ${OPENVAS_SCANNER_LISTEN_SOCKET}" -pidfile="/var/run/openvassd.pid" -command_background="true" - -depend() { - after bootmisc - need localmount net redis -} - -start_pre() { - checkpath --directory --mode 0775 --quiet /var/cache/openvas -} - -create_cache() { - checkpath --directory --mode 0775 --quiet /var/cache/openvas - ebegin "Generating initial Cache" - /usr/sbin/openvassd --foreground --only-cache - eend $? -} diff --git a/net-analyzer/openvas-scanner/files/openvas-scanner.logrotate b/net-analyzer/openvas-scanner/files/openvas-scanner.logrotate deleted file mode 100644 index 89f9e6d264df..000000000000 --- a/net-analyzer/openvas-scanner/files/openvas-scanner.logrotate +++ /dev/null @@ -1,11 +0,0 @@ -# logrotate for openvas scanner -/var/log/openvas/openvassd.messages { - rotate 4 - weekly - compress - delaycompress - missingok - postrotate - /bin/kill -HUP `pidof openvassd` - endscript -} diff --git a/net-analyzer/openvas-scanner/files/openvas-scanner.service b/net-analyzer/openvas-scanner/files/openvas-scanner.service deleted file mode 100644 index 4f30586ab517..000000000000 --- a/net-analyzer/openvas-scanner/files/openvas-scanner.service +++ /dev/null @@ -1,21 +0,0 @@ -[Unit] -Description=OpenVAS Scanner -After=network.target -After=redis.service -Before=gvmd.service -Requires=redis.service - -[Service] -Type=forking -EnvironmentFile=-/etc/openvas/sysconfig/openvas-scanner-daemon.conf -ExecStart=/usr/sbin/openvassd $OPENVAS_SCANNER_OPTIONS $OPENVAS_SCANNER_LISTEN_SOCKET -ExecReload=/bin/kill -HUP $MAINPID -Restart=on-failure -RestartSec=10 -KillMode=mixed -User=root -Group=root -TimeoutSec=1200 - -[Install] -WantedBy=multi-user.target diff --git a/net-analyzer/openvas-scanner/files/openvas-scanner.tmpfiles.d b/net-analyzer/openvas-scanner/files/openvas-scanner.tmpfiles.d deleted file mode 100644 index 18e820caec1b..000000000000 --- a/net-analyzer/openvas-scanner/files/openvas-scanner.tmpfiles.d +++ /dev/null @@ -1 +0,0 @@ -d /var/cache/openvassd 0775 diff --git a/net-analyzer/openvas-scanner/files/openvassd.conf b/net-analyzer/openvas-scanner/files/openvassd.conf deleted file mode 100644 index b218a4a27b02..000000000000 --- a/net-analyzer/openvas-scanner/files/openvassd.conf +++ /dev/null @@ -1,53 +0,0 @@ -#You can get detailed informations from https://linux.die.net/man/8/openvassd - -plugins_folder = /var/lib/openvas/plugins -include_folders = /var/lib/openvas/plugins -max_hosts = 30 -max_checks = 10 - -#Resource friendly -be_nice = no - -#Logfile -logfile = /var/log/openvas/openvassd.messages - -log_whole_attack = no -log_plugins_name_at_load = no -dumpfile = /var/log/openvas/openvassd.dump -cgi_path = /cgi-bin:/scripts - -#Turn off for push hard but increase false positive and slow down scans -optimize_test = yes - -checks_read_timeout = 5 -network_scan = no -non_simult_ports = 139, 445 -plugins_timeout = 320 -scanner_plugins_timeout = 36000 - -#Push harder to target -safe_checks = no - -auto_enable_dependencies = yes -use_mac_addr = no -nasl_no_signature_check = yes -drop_privileges = no -unscanned_closed = yes -unscanned_closed_udp = yes -vhosts = -vhosts_ip = -report_host_details = yes - -#Redis listening socket (must be same with redis socket) -kb_location = /tmp/redis.sock - -timeout_retry = 3 -time_between_request = 0 - -#Config File -config_file = /etc/openvas/openvassd.conf - -#Certificates (default these are not needed here but setup-check script looking for them) -cert_file = /var/lib/openvas/CA/servercert.pem -key_file = /var/lib/openvas/private/CA/serverkey.pem -ca_file = /var/lib/openvas/CA/cacert.pem |