diff --git a/security/openvas/Makefile b/security/openvas/Makefile index 5181bd1bc773..27e3a9a1a15a 100644 --- a/security/openvas/Makefile +++ b/security/openvas/Makefile @@ -1,63 +1,63 @@ PORTNAME= openvas DISTVERSION= 23.20.1 -PORTREVISION= 1 +PORTREVISION= 2 DISTVERSIONPREFIX= v CATEGORIES= security MAINTAINER= acm@FreeBSD.org COMMENT= Open vulnerability assessment scanner WWW= https://github.com/greenbone/openvas LICENSE= GPLv2+ BUILD_DEPENDS= flex:textproc/flex LIB_DEPENDS= libgvm_base.so:security/gvm-libs \ libgcrypt.so:security/libgcrypt \ libgpg-error.so:security/libgpg-error \ libpcap.so.1:net/libpcap \ libksba.so:security/libksba \ libgpgme.so:security/gpgme \ libssh.so:security/libssh \ libgnutls.so:security/gnutls \ libnetsnmp.so:net-mgmt/net-snmp \ libjson-glib-1.0.so:devel/json-glib \ libcurl.so:ftp/curl RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}impacket>=0:net/py-impacket@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}greenbone-feed-sync>0:security/py-greenbone-feed-sync@${PY_FLAVOR} \ redis-server:databases/redis \ snmpget:net-mgmt/net-snmp \ rsync:net/rsync \ nmap:security/nmap USES= bison cmake gnome gssapi:mit pkgconfig python ssl USE_GITHUB= yes GH_ACCOUNT= greenbone GH_PROJECT= ${PORTNAME}-scanner USE_GNOME= glib20 CMAKE_ARGS+= -DINSTALL_OLD_SYNC_SCRIPT=OFF USERS= gvm GROUPS= ${USERS} .include .if ${OPSYS} == FreeBSD CFLAGS+= -Wno-error=strict-prototypes -Wno-error=unused-but-set-variable -Wno-error=invalid-utf8 -Wno-implicit-function-declaration .endif # The struct this error is about is only ever accessed using bcopy() and memset(), # so the unaligned structure doesn't matter. Disable the error, but keep it as a # warning so we can see where it is. CFLAGS_armv6= -Wno-error=unaligned-access CFLAGS_armv7= -Wno-error=unaligned-access post-patch: @${REINPLACE_CMD} -e 's|#include ||g' ${WRKSRC}/src/nasl_plugins.c @${REINPLACE_CMD} -e 's|#include |#include |g' ${WRKSRC}/src/pluginload.c @${REINPLACE_CMD} -e 's|vendor_version_get ()|vendor_version_get (void)|g' ${WRKSRC}/misc/vendorversion.c post-install: @${MKDIR} ${STAGEDIR}/var/run/ospd .include diff --git a/security/openvas/files/patch-misc_plugutils.c b/security/openvas/files/patch-misc_plugutils.c new file mode 100644 index 000000000000..5c04ea7c4825 --- /dev/null +++ b/security/openvas/files/patch-misc_plugutils.c @@ -0,0 +1,11 @@ +--- misc/plugutils.c.orig 2025-08-01 11:38:10 UTC ++++ misc/plugutils.c +@@ -74,7 +74,7 @@ add_kb_usage (struct script_infos *args, size_t size) + kb_usage += size; + if (kb_usage > max_kb_usage) + { +- g_warning ("KB usage exceeded %lu MB. Unable to store any further KB " ++ g_warning ("KB usage exceeded %zu MB. Unable to store any further KB " + "Items for script %s", + max_kb_usage / 1024 / 1024, args->name); + return -1; diff --git a/security/openvas/files/patch-src_attack.c b/security/openvas/files/patch-src_attack.c index af15212b9768..9a78559b0a30 100644 --- a/security/openvas/files/patch-src_attack.c +++ b/security/openvas/files/patch-src_attack.c @@ -1,29 +1,38 @@ ---- src/attack.c 2025-03-03 04:49:55.000000000 -0800 -+++ src/attack.c 2025-04-14 20:09:40.968033000 -0700 +--- src/attack.c.orig 2025-05-27 12:10:19 UTC ++++ src/attack.c @@ -31,7 +31,6 @@ #include "utils.h" #include /* for inet_ntoa() */ -#include #include /* for errno() */ #include #include -@@ -1555,14 +1554,14 @@ +@@ -1555,21 +1554,21 @@ stop: gettimeofday (&now, NULL); if (test_alive_hosts_only) { - g_message ("Vulnerability scan %s finished in %ld seconds: " + g_message ("Vulnerability scan %s finished in %lld seconds: " "%d alive hosts of %d", - globals->scan_id, now.tv_sec - then.tv_sec, + globals->scan_id, (long long)now.tv_sec - then.tv_sec, gvm_hosts_count (alive_hosts_list), gvm_hosts_count (hosts)); } else - g_message ("Vulnerability scan %s finished in %ld seconds: %d hosts", - globals->scan_id, now.tv_sec - then.tv_sec, + g_message ("Vulnerability scan %s finished in %lld seconds: %d hosts", + globals->scan_id, (long long)now.tv_sec - then.tv_sec, gvm_hosts_count (hosts)); if (prefs_get ("report_scripts")) + { + char *buff = +- g_strdup_printf ("},\"scan_time\": {\"start\": %ld, \"stop\": %ld}}", +- then.tv_sec, now.tv_sec); ++ g_strdup_printf ("},\"scan_time\": {\"start\": %lld, \"stop\": %lld}}", ++ (long long)then.tv_sec, (long long)now.tv_sec); + char *path = g_strdup_printf ( + "%s/%s-stats.json", prefs_get ("report_scripts"), globals->scan_id); +