Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Jan 2021 08:42:12 +0000 (UTC)
From:      Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r560472 - in head/security/gvm-libs: . files
Message-ID:  <202101060842.1068gCa2074179@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: acm
Date: Wed Jan  6 08:42:12 2021
New Revision: 560472
URL: https://svnweb.freebsd.org/changeset/ports/560472

Log:
  - New port: security/gvm-libs
  
  This is the libraries module for the Greenbone Vulnerability Management
  Solution.
  
  It is used for the Greenbone Security Manager appliances and provides various
  functionalities to support the integrated service daemons.
  
  WWW: https://github.com/greenbone/gvm-libs

Added:
  head/security/gvm-libs/
  head/security/gvm-libs/Makefile   (contents, props changed)
  head/security/gvm-libs/distinfo   (contents, props changed)
  head/security/gvm-libs/files/
  head/security/gvm-libs/files/patch-CMakeLists.txt   (contents, props changed)
  head/security/gvm-libs/files/patch-base_hosts.c   (contents, props changed)
  head/security/gvm-libs/files/patch-base_networking.c   (contents, props changed)
  head/security/gvm-libs/files/patch-base_networking.h   (contents, props changed)
  head/security/gvm-libs/files/patch-boreas_alivedetection.c   (contents, props changed)
  head/security/gvm-libs/files/patch-boreas_ping.c   (contents, props changed)
  head/security/gvm-libs/files/patch-boreas_sniffer.c   (contents, props changed)
  head/security/gvm-libs/files/patch-boreas_util.c   (contents, props changed)
  head/security/gvm-libs/files/patch-osp_osp.c   (contents, props changed)
  head/security/gvm-libs/files/patch-util_radiusutils.c   (contents, props changed)
  head/security/gvm-libs/pkg-descr   (contents, props changed)
  head/security/gvm-libs/pkg-plist   (contents, props changed)

Added: head/security/gvm-libs/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/gvm-libs/Makefile	Wed Jan  6 08:42:12 2021	(r560472)
@@ -0,0 +1,44 @@
+# $FreeBSD$
+
+PORTNAME=	gvm
+DISTVERSION=	20.8.0
+DISTVERSIONPREFIX=	v
+CATEGORIES=	security
+PKGNAMESUFFIX=	-libs
+
+MAINTAINER=	acm@FreeBSD.org
+COMMENT=	libraries module for the GVM solution
+
+LICENSE=	GPLv2+
+
+BUILD_DEPENDS=	doxygen>0:devel/doxygen
+LIB_DEPENDS=	libgpgme.so:security/gpgme \
+		libgnutls.so:security/gnutls \
+		libuuid.so:misc/e2fsprogs-libuuid \
+		libssh.so:security/libssh \
+		libhiredis.so:databases/hiredis \
+		libgcrypt.so:security/libgcrypt
+RUN_DEPENDS=	doxygen>0:devel/doxygen
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	greenbone
+GH_PROJECT=	${PORTNAME}${PKGNAMESUFFIX}
+
+USES=		cmake gnome pkgconfig
+USE_GNOME=	glib20 libxml2
+USE_LDCONFIG=	yes
+
+OPTIONS_DEFINE=	LDAP RADIUS
+
+LDAP_CMAKE_ON= -DBUILD_WITH_LDAP=1
+LDAP_CMAKE_OFF= -DBUILD_WITH_LDAP=0
+LDAP_USE=	OPENLDAP=yes
+RADIUS_CMAKE_ON=-DBUILD_WITH_RADIUS=1
+RADIUS_CMAKE_OFF=-DBUILD_WITH_RADIUS=0
+RADIUS_LIB_DEPENDS=	libfreeradius-client.so:net/freeradius-client
+
+post-patch:
+	@${REINPLACE_CMD} -e 's|2.25.0|1.45.6|g' ${WRKSRC}/util/libgvm_util.pc.in
+	@${REINPLACE_CMD} -e 's|uuid>=2.25.0|uuid>=1.45.6|g' ${WRKSRC}/util/CMakeLists.txt
+
+.include <bsd.port.mk>

Added: head/security/gvm-libs/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/gvm-libs/distinfo	Wed Jan  6 08:42:12 2021	(r560472)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1609528750
+SHA256 (greenbone-gvm-libs-v20.8.0_GH0.tar.gz) = 83331f27e33675f83925194a34fe3d3aae4537b3fcb3d16252153b066d28e9ef
+SIZE (greenbone-gvm-libs-v20.8.0_GH0.tar.gz) = 265661

Added: head/security/gvm-libs/files/patch-CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/gvm-libs/files/patch-CMakeLists.txt	Wed Jan  6 08:42:12 2021	(r560472)
@@ -0,0 +1,29 @@
+--- CMakeLists.txt.orig	2020-08-12 04:56:00.000000000 -0500
++++ CMakeLists.txt	2021-01-03 17:25:26.973466000 -0500
+@@ -155,7 +155,7 @@
+ endif (NOT LIBDIR)
+ 
+ if (NOT LOCALSTATEDIR)
+-  set (LOCALSTATEDIR "${CMAKE_INSTALL_PREFIX}/var")
++  set (LOCALSTATEDIR "/var")
+ endif (NOT LOCALSTATEDIR)
+ 
+ if (NOT INCLUDEDIR)
+@@ -167,7 +167,7 @@
+ endif (NOT DATADIR)
+ 
+ if (NOT GVM_PID_DIR)
+-  set (GVM_PID_DIR "${LOCALSTATEDIR}/run")
++  set (GVM_PID_DIR "${LOCALSTATEDIR}/run/gvm")
+ endif (NOT GVM_PID_DIR)
+ 
+ if (NOT GVM_SYSCONF_DIR)
+@@ -176,7 +176,7 @@
+ 
+ 
+ if (NOT REDIS_SOCKET_PATH)
+-  set (REDIS_SOCKET_PATH "/run/redis/redis.sock")
++  set (REDIS_SOCKET_PATH "/var/run/redis/redis.sock")
+ endif ()
+ 
+ add_definitions (-DREDIS_SOCKET_PATH="${REDIS_SOCKET_PATH}")

Added: head/security/gvm-libs/files/patch-base_hosts.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/gvm-libs/files/patch-base_hosts.c	Wed Jan  6 08:42:12 2021	(r560472)
@@ -0,0 +1,53 @@
+--- base/hosts.c	2020-12-30 14:04:30.773110000 -0500
++++ base/hosts.c	2020-12-30 23:46:15.994709000 -0500
+@@ -34,11 +34,11 @@
+ #include <arpa/inet.h> /* for inet_pton, inet_ntop */
+ #include <assert.h>    /* for assert */
+ #include <ctype.h>     /* for isdigit */
+-#include <malloc.h>
+ #include <netdb.h>      /* for getnameinfo, NI_NAMEREQD */
+ #include <stdint.h>     /* for uint8_t, uint32_t */
+ #include <stdio.h>      /* for sscanf, perror */
+ #include <stdlib.h>     /* for strtol, atoi */
++#include <malloc_np.h>
+ #include <string.h>     /* for strchr, memcpy, memcmp, bzero, strcasecmp */
+ #include <sys/socket.h> /* for AF_INET, AF_INET6, sockaddr */
+ 
+@@ -1068,7 +1068,7 @@
+   hosts->count -= duplicates;
+   hosts->removed += duplicates;
+   hosts->current = 0;
+-  malloc_trim (0);
++ // malloc_trim (0);
+ }
+ 
+ /**
+@@ -1263,7 +1263,7 @@
+     gvm_hosts_deduplicate (hosts);
+ 
+   g_strfreev (split);
+-  malloc_trim (0);
++  //malloc_trim (0);
+   return hosts;
+ }
+ 
+@@ -1410,8 +1410,8 @@
+           gvm_vhost_t *vhost;
+ 
+           new = gvm_host_new ();
+-          if (ip6->s6_addr32[0] != 0 || ip6->s6_addr32[1] != 0
+-              || ip6->s6_addr32[2] != htonl (0xffff))
++          if (ip6->s6_addr[0] != 0 || ip6->s6_addr[1] != 0
++              || ip6->s6_addr[2] != 0xff)
+             {
+               new->type = HOST_TYPE_IPV6;
+               memcpy (&new->addr6, ip6, sizeof (new->addr6));
+@@ -1419,7 +1419,7 @@
+           else
+             {
+               new->type = HOST_TYPE_IPV4;
+-              memcpy (&new->addr6, &ip6->s6_addr32[3], sizeof (new->addr));
++              memcpy (&new->addr6, &ip6->s6_addr[12], sizeof (new->addr));
+             }
+           vhost =
+             gvm_vhost_new (g_strdup (host->name), g_strdup ("Forward-DNS"));

Added: head/security/gvm-libs/files/patch-base_networking.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/gvm-libs/files/patch-base_networking.c	Wed Jan  6 08:42:12 2021	(r560472)
@@ -0,0 +1,87 @@
+--- base/networking.c	2020-12-30 23:53:55.170376000 -0500
++++ base/networking.c	2020-12-31 00:06:29.941646000 -0500
+@@ -30,28 +30,30 @@
+ #include <errno.h>     /* for errno, EAFNOSUPPORT */
+ #include <glib/gstdio.h>
+ #include <ifaddrs.h>    /* for ifaddrs, freeifaddrs, getifaddrs */
++#include <sys/types.h>
+ #include <net/if.h>     /* for IFNAMSIZ */
++#include <netinet/in.h>
+ #include <stdint.h>     /* for uint32_t, uint8_t */
+ #include <stdlib.h>     /* for atoi, strtol */
+ #include <string.h>     /* for memcpy, bzero, strchr, strlen, strcmp, strncpy */
+ #include <sys/socket.h> /* for AF_INET, AF_INET6, AF_UNSPEC, sockaddr_storage */
+ #include <unistd.h>     /* for close */
+ 
+-#ifdef __FreeBSD__
+-#include <netinet/in.h>
+-#define s6_addr32 __u6_addr.__u6_addr32
+-#endif
++//#ifdef __FreeBSD__
++//#include <netinet/in.h>
++//#define s6_addr32 __u6_addr.__u6_addr32
++//#endif
+ 
+ /* Global variables */
+ 
+ /* Source interface name eg. eth1. */
+-char global_source_iface[IFNAMSIZ] = {'\0'};
++char global_source_iface[IFNAMSIZ];
+ 
+ /* Source IPv4 address. */
+-struct in_addr global_source_addr = {.s_addr = 0};
++struct in_addr global_source_addr;
+ 
+ /* Source IPv6 address. */
+-struct in6_addr global_source_addr6 = {.s6_addr32 = {0, 0, 0, 0}};
++struct in6_addr global_source_addr6;
+ 
+ /* Source Interface/Address related functions. */
+ 
+@@ -244,10 +246,19 @@
+   if (ip4 == NULL || ip6 == NULL)
+     return;
+ 
+-  ip6->s6_addr32[0] = 0;
+-  ip6->s6_addr32[1] = 0;
+-  ip6->s6_addr32[2] = htonl (0xffff);
+-  memcpy (&ip6->s6_addr32[3], ip4, sizeof (struct in_addr));
++  ip6->s6_addr[0] = 0;
++  ip6->s6_addr[1] = 0;
++  ip6->s6_addr[2] = 0;
++  ip6->s6_addr[3] = 0;
++  ip6->s6_addr[4] = 0;
++  ip6->s6_addr[5] = 0;
++  ip6->s6_addr[6] = 0;
++  ip6->s6_addr[7] = 0;
++  ip6->s6_addr[8] = 0;
++  ip6->s6_addr[9] = 0;
++  ip6->s6_addr[10] = 0xff;
++  ip6->s6_addr[11] = 0xff;
++  memcpy (&ip6->s6_addr[12], ip4, sizeof (struct in_addr));
+ }
+ 
+ /**
+@@ -262,7 +273,7 @@
+   if (!addr6)
+     return;
+   if (IN6_IS_ADDR_V4MAPPED (addr6))
+-    inet_ntop (AF_INET, &addr6->s6_addr32[3], str, INET6_ADDRSTRLEN);
++    inet_ntop (AF_INET, &addr6->s6_addr[12], str, INET6_ADDRSTRLEN);
+   else
+     inet_ntop (AF_INET6, addr6, str, INET6_ADDRSTRLEN);
+ }
+@@ -808,11 +819,11 @@
+       if (IN6_IS_ADDR_V4MAPPED (&addr6))
+         {
+           /* addr is 0.0.0.0 */
+-          if (addr6_p->s6_addr32[3] == 0)
++          if (addr6_p->s6_addr[12] == 0)
+             return 1;
+ 
+           /* addr starts with 127.0.0.1 */
+-          if ((addr6_p->s6_addr32[3] & htonl (0xFF000000))
++          if ((addr6_p->s6_addr[12] & htonl (0xFF000000))
+               == htonl (0x7F000000))
+             return 1;
+         }

Added: head/security/gvm-libs/files/patch-base_networking.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/gvm-libs/files/patch-base_networking.h	Wed Jan  6 08:42:12 2021	(r560472)
@@ -0,0 +1,10 @@
+--- base/networking.h	2020-12-31 00:01:35.140537000 -0500
++++ base/networking.h	2020-12-31 00:04:13.003782000 -0500
+@@ -27,6 +27,7 @@
+ 
+ #include "array.h" /* for array_t */
+ 
++#include <netinet/in.h>
+ #include <netdb.h> /* for struct in6_addr */
+ 
+ /**

Added: head/security/gvm-libs/files/patch-boreas_alivedetection.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/gvm-libs/files/patch-boreas_alivedetection.c	Wed Jan  6 08:42:12 2021	(r560472)
@@ -0,0 +1,16 @@
+--- boreas/alivedetection.c.orig	2020-12-30 23:49:07.498953000 -0500
++++ boreas/alivedetection.c	2020-12-30 23:50:37.570417000 -0500
+@@ -39,7 +39,12 @@
+ #include <netinet/ip6.h>
+ #include <netinet/ip_icmp.h>
+ #include <netinet/tcp.h>
+-#include <netpacket/packet.h> /* for sockaddr_ll */
++#ifdef AF_LINK
++#   include <net/if_dl.h>
++#endif
++#ifdef AF_PACKET
++#   include <netpacket/packet.h>
++#endif
+ #include <pcap.h>
+ #include <pthread.h>
+ #include <stdlib.h>

Added: head/security/gvm-libs/files/patch-boreas_ping.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/gvm-libs/files/patch-boreas_ping.c	Wed Jan  6 08:42:12 2021	(r560472)
@@ -0,0 +1,114 @@
+--- boreas/ping.c	2020-12-31 00:53:07.116404000 -0500
++++ boreas/ping.c	2020-12-31 02:11:16.635441000 -0500
+@@ -29,15 +29,21 @@
+ #include <net/ethernet.h>
+ #include <net/if.h> /* for if_nametoindex() */
+ #include <netinet/icmp6.h>
++#include <sys/types.h>
+ #include <netinet/in.h>
++#include <netinet/ip.h>
+ #include <netinet/ip6.h>
+ #include <netinet/ip_icmp.h>
+ #include <netinet/tcp.h>
+-#include <netpacket/packet.h> /* for sockaddr_ll */
++#ifdef AF_LINK
++#   include <net/if_dl.h>
++#endif
++#ifdef AF_PACKET
++#   include <netpacket/packet.h>
++#endif
+ #include <stdlib.h>
+ #include <sys/socket.h>
+ #include <sys/time.h>
+-#include <sys/types.h>
+ #include <unistd.h>
+ 
+ #undef G_LOG_DOMAIN
+@@ -138,12 +144,12 @@
+   struct icmphdr *icmp;
+ 
+   icmp = (struct icmphdr *) sendbuf;
+-  icmp->type = ICMP_ECHO;
+-  icmp->code = 0;
++  icmp->icmp_type = ICMP_ECHO;
++  icmp->icmp_code = 0;
+ 
+   len = 8 + datalen;
+-  icmp->checksum = 0;
+-  icmp->checksum = in_cksum ((u_short *) icmp, len);
++  icmp->icmp_cksum = 0;
++  icmp->icmp_cksum = in_cksum ((u_short *) icmp, len);
+ 
+   memset (&soca, 0, sizeof (soca));
+   soca.sin_family = AF_INET;
+@@ -197,7 +203,7 @@
+     }
+   else
+     {
+-      dst4.s_addr = dst6_p->s6_addr32[3];
++      dst4.s_addr = dst6_p->s6_addr[12];
+       send_icmp_v4 (scanner->icmpv4soc, dst4_p);
+     }
+ }
+@@ -431,7 +437,7 @@
+     }
+   else
+     {
+-      dst4.s_addr = dst6_p->s6_addr32[3];
++      dst4.s_addr = dst6_p->s6_addr[12];
+       send_tcp_v4 (scanner, dst4_p);
+     }
+ }
+@@ -445,7 +451,7 @@
+ static void
+ send_arp_v4 (int soc, struct in_addr *dst_p)
+ {
+-  struct sockaddr_ll soca;
++  struct sockaddr_dl soca;
+   struct arp_hdr arphdr;
+   int frame_length;
+   uint8_t *ether_frame;
+@@ -505,10 +511,10 @@
+     }
+ 
+   /* Fill in sockaddr_ll.*/
+-  soca.sll_ifindex = ifaceindex;
+-  soca.sll_family = AF_PACKET;
+-  memcpy (soca.sll_addr, src_mac, 6 * sizeof (uint8_t));
+-  soca.sll_halen = 6;
++  soca.sdl_index = ifaceindex;
++  soca.sdl_family = AF_LINK;
++  memcpy (soca.sdl_data, src_mac, 6 * sizeof (uint8_t));
++  soca.sdl_alen = 6;
+ 
+   /* Fill ARP header.*/
+   /* IP addresses. */
+@@ -520,7 +526,7 @@
+    * Protocol address length is length of IPv4.
+    * OpCode is ARP request. */
+   arphdr.htype = htons (1);
+-  arphdr.ptype = htons (ETH_P_IP);
++  arphdr.ptype = htons(AF_INET);
+   arphdr.hlen = 6;
+   arphdr.plen = 4;
+   arphdr.opcode = htons (1);
+@@ -535,8 +541,8 @@
+   memcpy (ether_frame, dst_mac, 6 * sizeof (uint8_t));
+   memcpy (ether_frame + 6, src_mac, 6 * sizeof (uint8_t));
+   /* ethernet type code */
+-  ether_frame[12] = ETH_P_ARP / 256;
+-  ether_frame[13] = ETH_P_ARP % 256;
++  ether_frame[12] = AF_ARP / 256;
++  ether_frame[13] = AF_ARP % 256;
+   /* ARP header.  ETH_HDRLEN = 14, ARP_HDRLEN = 28 */
+   memcpy (ether_frame + 14, &arphdr, 28 * sizeof (uint8_t));
+ 
+@@ -592,7 +598,7 @@
+     }
+   else
+     {
+-      dst4.s_addr = dst6_p->s6_addr32[3];
++      dst4.s_addr = dst6_p->s6_addr[12];
+       send_arp_v4 (scanner->arpv4soc, dst4_p);
+     }
+ }

Added: head/security/gvm-libs/files/patch-boreas_sniffer.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/gvm-libs/files/patch-boreas_sniffer.c	Wed Jan  6 08:42:12 2021	(r560472)
@@ -0,0 +1,11 @@
+--- boreas/sniffer.c	2021-01-04 16:55:42.803387000 -0500
++++ boreas/sniffer.c	2021-01-04 16:57:10.155504000 -0500
+@@ -25,6 +25,8 @@
+ #include <arpa/inet.h>
+ #include <errno.h>
+ #include <glib.h>
++#include <sys/types.h>
++#include <sys/socket.h>
+ #include <net/if_arp.h>
+ #include <netinet/ip.h>
+ #include <stdlib.h>

Added: head/security/gvm-libs/files/patch-boreas_util.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/gvm-libs/files/patch-boreas_util.c	Wed Jan  6 08:42:12 2021	(r560472)
@@ -0,0 +1,62 @@
+--- boreas/util.c	2020-12-30 23:52:07.849996000 -0500
++++ boreas/util.c	2020-12-31 01:36:37.600382000 -0500
+@@ -21,12 +21,20 @@
+ 
+ #include "../base/networking.h" /* for range_t */
+ 
++#include <stdio.h>
++#include <sys/types.h>
++#include <sys/socket.h>
+ #include <errno.h>
+ #include <glib.h>
+ #include <ifaddrs.h> /* for getifaddrs() */
+ #include <net/ethernet.h>
+ #include <net/if.h>           /* for if_nametoindex() */
+-#include <netpacket/packet.h> /* for sockaddr_ll */
++#ifdef AF_LINK
++#   include <net/if_dl.h>
++#endif
++#ifdef AF_PACKET
++#   include <netpacket/packet.h>
++#endif
+ #include <stdlib.h>
+ #include <string.h>
+ #include <sys/socket.h>
+@@ -109,22 +117,22 @@
+     {
+       for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next)
+         {
+-          if ((ifa->ifa_addr) && (ifa->ifa_addr->sa_family == AF_PACKET)
++          if ((ifa->ifa_addr) && (ifa->ifa_addr->sa_family == AF_LINK)
+               && !(ifa->ifa_flags & (IFF_LOOPBACK)))
+             {
+               if (interface_provided)
+                 {
+                   if (g_strcmp0 (interface, ifa->ifa_name) == 0)
+                     {
+-                      struct sockaddr_ll *s =
+-                        (struct sockaddr_ll *) ifa->ifa_addr;
+-                      memcpy (mac, s->sll_addr, 6 * sizeof (uint8_t));
++                      struct sockaddr_dl *s =
++                        (struct sockaddr_dl *) ifa->ifa_addr;
++                      memcpy (mac, s->sdl_data, 6 * sizeof (uint8_t));
+                     }
+                 }
+               else
+                 {
+-                  struct sockaddr_ll *s = (struct sockaddr_ll *) ifa->ifa_addr;
+-                  memcpy (mac, s->sll_addr, 6 * sizeof (uint8_t));
++                  struct sockaddr_dl *s = (struct sockaddr_dl *) ifa->ifa_addr;
++                  memcpy (mac, s->sdl_data, 6 * sizeof (uint8_t));
+                 }
+             }
+         }
+@@ -508,7 +516,7 @@
+       break;
+     case ARPV4:
+       {
+-        soc = socket (PF_PACKET, SOCK_RAW, htons (ETH_P_ALL));
++        soc = socket (PF_LINK, SOCK_RAW, 0);
+         if (soc < 0)
+           {
+             g_warning ("%s: failed to open ARPV4 socket: %s", __func__,

Added: head/security/gvm-libs/files/patch-osp_osp.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/gvm-libs/files/patch-osp_osp.c	Wed Jan  6 08:42:12 2021	(r560472)
@@ -0,0 +1,22 @@
+--- osp/osp.c	2021-01-03 15:42:39.761321000 -0500
++++ osp/osp.c	2021-01-03 15:48:50.962832000 -0500
+@@ -134,7 +134,6 @@
+   if (host && *host == '/')
+     {
+       struct sockaddr_un addr;
+-      int len;
+ 
+       connection = g_malloc0 (sizeof (*connection));
+       connection->socket = socket (AF_UNIX, SOCK_STREAM, 0);
+@@ -142,9 +141,8 @@
+         return NULL;
+ 
+       addr.sun_family = AF_UNIX;
+-      strncpy (addr.sun_path, host, sizeof (addr.sun_path) - 1);
+-      len = strlen (addr.sun_path) + sizeof (addr.sun_family);
+-      if (connect (connection->socket, (struct sockaddr *) &addr, len) == -1)
++      strcpy (addr.sun_path, host);
++      if (connect (connection->socket, (struct sockaddr *) &addr, sizeof(struct sockaddr_un)) == -1)
+         {
+           close (connection->socket);
+           return NULL;

Added: head/security/gvm-libs/files/patch-util_radiusutils.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/gvm-libs/files/patch-util_radiusutils.c	Wed Jan  6 08:42:12 2021	(r560472)
@@ -0,0 +1,12 @@
+--- util/radiusutils.c	2020-12-31 02:24:20.387082000 -0500
++++ util/radiusutils.c	2020-12-31 02:27:54.965720000 -0500
+@@ -24,6 +24,9 @@
+ 
+ #ifdef ENABLE_RADIUS_AUTH
+ 
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <netinet/in.h>
+ #include <arpa/inet.h> /* for inet_pton */
+ 
+ #if defined(RADIUS_AUTH_FREERADIUS)

Added: head/security/gvm-libs/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/gvm-libs/pkg-descr	Wed Jan  6 08:42:12 2021	(r560472)
@@ -0,0 +1,7 @@
+This is the libraries module for the Greenbone Vulnerability Management 
+Solution.
+
+It is used for the Greenbone Security Manager appliances and provides various 
+functionalities to support the integrated service daemons.
+
+WWW: https://github.com/greenbone/gvm-libs

Added: head/security/gvm-libs/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/gvm-libs/pkg-plist	Wed Jan  6 08:42:12 2021	(r560472)
@@ -0,0 +1,56 @@
+include/gvm/base/array.h
+include/gvm/base/credentials.h
+include/gvm/base/cvss.h
+include/gvm/base/drop_privileges.h
+include/gvm/base/hosts.h
+include/gvm/base/logging.h
+include/gvm/base/networking.h
+include/gvm/base/nvti.h
+include/gvm/base/pidfile.h
+include/gvm/base/prefs.h
+include/gvm/base/proctitle.h
+include/gvm/base/pwpolicy.h
+include/gvm/base/settings.h
+include/gvm/base/strings.h
+include/gvm/base/version.h
+include/gvm/boreas/alivedetection.h
+include/gvm/boreas/boreas_error.h
+include/gvm/boreas/boreas_io.h
+include/gvm/boreas/cli.h
+include/gvm/boreas/ping.h
+include/gvm/boreas/sniffer.h
+include/gvm/boreas/util.h
+include/gvm/gmp/gmp.h
+include/gvm/osp/osp.h
+include/gvm/util/authutils.h
+include/gvm/util/compressutils.h
+include/gvm/util/fileutils.h
+include/gvm/util/gpgmeutils.h
+include/gvm/util/kb.h
+include/gvm/util/ldaputils.h
+include/gvm/util/nvticache.h
+include/gvm/util/radiusutils.h
+include/gvm/util/serverutils.h
+include/gvm/util/sshutils.h
+include/gvm/util/uuidutils.h
+include/gvm/util/xmlutils.h
+lib/libgvm_base.so
+lib/libgvm_base.so.20
+lib/libgvm_base.so.20.8.0
+lib/libgvm_boreas.so
+lib/libgvm_boreas.so.20
+lib/libgvm_boreas.so.20.8.0
+lib/libgvm_gmp.so
+lib/libgvm_gmp.so.20
+lib/libgvm_gmp.so.20.8.0
+lib/libgvm_osp.so
+lib/libgvm_osp.so.20
+lib/libgvm_osp.so.20.8.0
+lib/libgvm_util.so
+lib/libgvm_util.so.20
+lib/libgvm_util.so.20.8.0
+libdata/pkgconfig/libgvm_base.pc
+libdata/pkgconfig/libgvm_boreas.pc
+libdata/pkgconfig/libgvm_gmp.pc
+libdata/pkgconfig/libgvm_osp.pc
+libdata/pkgconfig/libgvm_util.pc



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101060842.1068gCa2074179>