Here’s a fix for a feature I am using - it allows you to run defined trigger scripts, rather than having them silently fail with EFAULT. Will mention it to upstream but I don’t have the time/experience to update the port the latest release if/when gets integrated.
Apologies if I did anything wrong, and thanks. —david Index: Makefile =================================================================== RCS file: /cvs/ports/net/pmacct/Makefile,v retrieving revision 1.25 diff -u -p -r1.25 Makefile --- Makefile 26 Jul 2017 22:45:28 -0000 1.25 +++ Makefile 22 Jan 2018 22:11:44 -0000 @@ -3,7 +3,7 @@ COMMENT= IP accounting software DISTNAME= pmacct-1.5.3 -REVISION= 1 +REVISION= 2 CATEGORIES= net HOMEPAGE= http://www.pmacct.net/ Index: patches/patch-src_plugin_common_c =================================================================== RCS file: patches/patch-src_plugin_common_c diff -N patches/patch-src_plugin_common_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_plugin_common_c 22 Jan 2018 22:11:44 -0000 @@ -0,0 +1,17 @@ +$OpenBSD$ + +Index: src/plugin_common.c +--- src/plugin_common.c.orig ++++ src/plugin_common.c +@@ -782,10 +782,8 @@ void P_exit_now(int signum) + + int P_trigger_exec(char *filename) + { +- char *args[1]; ++ char *args[2] = { filename, NULL }; + int pid; +- +- memset(args, 0, sizeof(args)); + + switch (pid = vfork()) { + case -1: Index: patches/patch-src_sql_common_c =================================================================== RCS file: patches/patch-src_sql_common_c diff -N patches/patch-src_sql_common_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_sql_common_c 22 Jan 2018 22:11:44 -0000 @@ -0,0 +1,17 @@ +$OpenBSD$ + +Index: src/sql_common.c +--- src/sql_common.c.orig ++++ src/sql_common.c +@@ -1050,10 +1050,8 @@ void sql_sum_mac_insert(struct primitives_ptrs *prim_p + + int sql_trigger_exec(char *filename) + { +- char *args[1]; ++ char *args[2] = { filename, NULL }; + int pid; +- +- memset(args, 0, sizeof(args)); + + switch (pid = vfork()) { + case -1: