From nobody Sat May 27 04:25:57 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QSpd23Fyjz4WRpK; Sat, 27 May 2023 04:25:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QSpd20L5Yz4FNL; Sat, 27 May 2023 04:25:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685161558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5jvMoLHo9X3ykcHgjyMu08Pu5YFNdg6bW+U37Qpc4AM=; b=aTbCX/GXoGI27apbhEw+pcPjzorLxgs1mBfgzMbkn0QrGtbmVGMJ5SrMLGOuHJ+pJ1gOfe JA6dVgJtTQmJQ0nWRYz+5BY/bJMUbjI0NOGX5c8++m2vU/M+MC3+ONFVxP3hvohjmpjxAW LhxNekwUdaQfbgfaWZOTC9KyaM3VVA2bNAoi593LhVWOq5RcsygFswXWxfgI+0Ic/tlOS2 FIEPNas8VVA2vtnuG0howHv8zMkXCpWl9qsTgedRLQAMpGK6KnJ3dhT7g9DR29tulcR6jM dBXAW5QFTa9OFOrrQAey2Fz9uYsWC6/B0RDSZsxsS/R2bqtfZBNBS62azXkBVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685161558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5jvMoLHo9X3ykcHgjyMu08Pu5YFNdg6bW+U37Qpc4AM=; b=jeBi87uyeTqfnR5EqrfFyXi/hsVWdibw6H3T7Es/hXTN3FwpFHHcPxyy/Aq4PTMlKBmspD Lo97qrfe7tDVXutxZYePtdls2br4GsxM+S1o0FPyfoR1dCbs1xInopZsRvzkOxhkOZNQ9C SZ3ZgOrGKgK85Vn068O1OWnVYsfoxvL2AmcnSwd+/e/WDls+nho6Ppqj9yqcksaA1plDOX lSFjof6rhruWp8ADbUFnZOtwAt9k5s/pCPKnL11iOrR+H2zLavKYDWWbyxfOeIwIfrbfN/ V2T6YBVpfmhxxzJ6KgEGsGVmkpMqbDYu0SdiXoq6R6+562UsQ+1RH5ZadgG3Fw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685161558; a=rsa-sha256; cv=none; b=ZknCOWMnGPbsMwZ6wA1m/amOTrVBT+w9l1o+UsrYGc5ypDJ8k4Nh3wW1r8tTf9vySYlina UmTM1n7kRVq+wb1VK6JEw4lrMuQSkHLy9kxRq+oQlPg/4MGwi0IrLL4MZNPcQyJpuMVwXZ 9UIyys91I1Djaz0eId7zPE1/qJHH35ob150C3nuDGgbBAFumvleBnBj+xkmN81X1l2q12M wraOtxlqisBq6dllIa/XJSsum16icL/uj3TD2dSHxUluAlAndCWmyZqbPtkNM8gJl+laZF JEOXXg9f39WL3cKrhJ8SCq18mB/q2CQ9a1GiDR+7kirrcIkkPSqIRB0oEwpoXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QSpd15GR3zZNF; Sat, 27 May 2023 04:25:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 34R4PvEj024181; Sat, 27 May 2023 04:25:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34R4Pv1h024180; Sat, 27 May 2023 04:25:57 GMT (envelope-from git) Date: Sat, 27 May 2023 04:25:57 GMT Message-Id: <202305270425.34R4Pv1h024180@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: 93250c4daa16 - main - security/snoopy: Update to 2.5.1 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 93250c4daa162d0c3a39f9ed26fa7be399662159 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=93250c4daa162d0c3a39f9ed26fa7be399662159 commit 93250c4daa162d0c3a39f9ed26fa7be399662159 Author: Po-Chuan Hsieh AuthorDate: 2023-05-27 04:07:50 +0000 Commit: Po-Chuan Hsieh CommitDate: 2023-05-27 04:07:50 +0000 security/snoopy: Update to 2.5.1 Changes: https://github.com/a2o/snoopy/releases --- security/snoopy/Makefile | 2 +- security/snoopy/distinfo | 6 ++-- .../snoopy/files/patch-build-Makefile.am.common | 9 ++++-- security/snoopy/files/patch-configure.ac | 24 ++++++++++----- .../snoopy/files/patch-src-datasource-domain.c | 16 ++++++++-- security/snoopy/files/patch-src-datasource-tid.c | 11 ------- security/snoopy/files/patch-src-snoopy.h | 13 ++++----- security/snoopy/files/patch-src-util-pwd.c | 34 ++++++++++++++++++++++ .../patch-tests-bin-action-stress-threadsexec.c | 11 +++++++ .../patch-tests-bin-snoopy-test-exec-in-threads.c | 11 ------- security/snoopy/pkg-plist | 3 +- 11 files changed, 91 insertions(+), 49 deletions(-) diff --git a/security/snoopy/Makefile b/security/snoopy/Makefile index 8065e22b4c3c..4a446ff74996 100644 --- a/security/snoopy/Makefile +++ b/security/snoopy/Makefile @@ -1,5 +1,5 @@ PORTNAME= snoopy -PORTVERSION= 2.4.15 +PORTVERSION= 2.5.1 CATEGORIES= security MASTER_SITES= https://github.com/a2o/snoopy/releases/download/snoopy-${PORTVERSION}/ diff --git a/security/snoopy/distinfo b/security/snoopy/distinfo index 76681117b826..8d35d7fc851c 100644 --- a/security/snoopy/distinfo +++ b/security/snoopy/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1643971000 -SHA256 (snoopy-2.4.15.tar.gz) = 4502136308fa0ce36d7e7458f00a53d7415d6bbd13206129ec2969c20bd4b572 -SIZE (snoopy-2.4.15.tar.gz) = 617952 +TIMESTAMP = 1684104332 +SHA256 (snoopy-2.5.1.tar.gz) = 09daa74213c360acaf84318710f2902763a9c08be54753dabcc09478dcb9c43e +SIZE (snoopy-2.5.1.tar.gz) = 685195 diff --git a/security/snoopy/files/patch-build-Makefile.am.common b/security/snoopy/files/patch-build-Makefile.am.common index 8f6b8156fa43..78fd87472f8d 100644 --- a/security/snoopy/files/patch-build-Makefile.am.common +++ b/security/snoopy/files/patch-build-Makefile.am.common @@ -1,8 +1,11 @@ ---- build/Makefile.am.common.orig 2020-12-28 04:42:28 UTC +--- build/Makefile.am.common.orig 2022-08-24 00:12:41 UTC +++ build/Makefile.am.common -@@ -10,4 +10,4 @@ MAINTAINERCLEANFILES = Makefile.in +@@ -10,7 +10,7 @@ MAINTAINERCLEANFILES = Makefile.in # -I$(top_srcdir)/src is here for #include "snoopy.h" (or similar) to work everywhere # -I$(top_srcdir) is here for #include "lib/*/src/*.h" to work everywhere (additionally, this also makes references "src/*/*.h" work too) # --AM_CFLAGS = -Wall -Werror -Wextra -Wno-unused-parameter -std=c99 -Wpedantic -I$(top_srcdir)/src -I$(top_srcdir) +-AM_CFLAGS = -Wall -Werror -Wextra -Wno-unused-parameter -std=c99 -Wpedantic -fvisibility=hidden -I$(top_srcdir)/src -I$(top_srcdir) +AM_CFLAGS = -Wextra -Wno-unused-parameter -std=c99 -Wpedantic -I$(top_srcdir)/src -I$(top_srcdir) + + + diff --git a/security/snoopy/files/patch-configure.ac b/security/snoopy/files/patch-configure.ac index 082eba06c24c..ea08512b4add 100644 --- a/security/snoopy/files/patch-configure.ac +++ b/security/snoopy/files/patch-configure.ac @@ -1,15 +1,15 @@ ---- configure.ac.orig 2021-01-18 13:01:11 UTC +--- configure.ac.orig 2022-09-20 22:03:33 UTC +++ configure.ac -@@ -30,7 +30,7 @@ AC_CONFIG_SRCDIR([src/eventsource/execve_wrapper.c]) +@@ -27,7 +27,7 @@ AC_CONFIG_SRCDIR([src/entrypoint/execve-wrapper.c]) AC_CONFIG_AUX_DIR([build/aux]) - AC_CONFIG_MACRO_DIR([build/m4]) + AC_CONFIG_MACRO_DIRS([build/m4]) m4_include([build/snoopy.m4]) -AM_INIT_AUTOMAKE([1.11 gnu silent-rules subdir-objects -Wall -Werror]) +AM_INIT_AUTOMAKE([1.11 gnu silent-rules subdir-objects]) ### Silent make output -@@ -81,7 +81,6 @@ AC_PROG_SED +@@ -82,7 +82,6 @@ LT_PATH_NM ### Check for programs required for TEST suite # SNOOPY_PROG_REQUIRE([dirname], [DIRNAME], [Needed for "make check" test suite.]) @@ -17,19 +17,19 @@ SNOOPY_PROG_REQUIRE([readlink], [READLINK], [Needed for "make check" test suite.]) SNOOPY_PROG_SUGGEST([socat], [SOCAT], [Needed for "make check" test suite.]) SNOOPY_PROG_SUGGEST([ps], [PS], [Needed for "make check" test suite.]) -@@ -89,19 +88,12 @@ SNOOPY_PROG_REQUIRE([wc], [WC], [Needed fo +@@ -90,11 +89,6 @@ SNOOPY_PROG_REQUIRE([wc], [WC], [Needed fo -dnl Checks for libraries. --dnl FIXME: Replace `main' with a function in `-ldl': -AC_CHECK_LIB([dl], [dlsym], [], [ - AC_MSG_ERROR([A library is missing. Unable to continue.]) -]) - dnl Checks for header files. AC_CHECK_HEADERS([ \ - ctype.h \ + arpa/inet.h \ +@@ -102,7 +96,6 @@ AC_CHECK_HEADERS([ \ dlfcn.h \ errno.h \ fcntl.h \ @@ -37,7 +37,15 @@ grp.h \ limits.h \ pwd.h \ -@@ -784,7 +776,6 @@ AS_IF([test "x$code_coverage_enabled" = "xyes"], [ +@@ -119,7 +112,6 @@ AC_CHECK_HEADERS([ \ + sys/un.h \ + time.h \ + unistd.h \ +- utmp.h \ + ], [], [ + AC_MSG_ERROR([A header file is missing. Unable to continue.]) + ]) +@@ -818,7 +810,6 @@ AS_IF([test "x$code_coverage_enabled" = "xyes"], [ CXXFLAGS=`echo $CXXFLAGS | sed 's/-O[1-9s]/-O0/g'` CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage" CXXFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage" diff --git a/security/snoopy/files/patch-src-datasource-domain.c b/security/snoopy/files/patch-src-datasource-domain.c index aa0a3226e961..4cb56051c32f 100644 --- a/security/snoopy/files/patch-src-datasource-domain.c +++ b/security/snoopy/files/patch-src-datasource-domain.c @@ -1,6 +1,16 @@ ---- src/datasource/domain.c.orig 2020-12-17 13:03:54 UTC +--- src/datasource/domain.c.orig 2022-08-27 02:05:09 UTC +++ src/datasource/domain.c -@@ -44,7 +44,7 @@ +@@ -36,7 +36,9 @@ + #include + #include + #include ++#define __BSD_VISIBLE 1 + #include ++#undef __BSD_VISIBLE + #include + + +@@ -44,7 +46,7 @@ /* * Local defines */ @@ -9,7 +19,7 @@ #define HOSTS_PATH "/etc/hosts" #define HOSTS_LINE_SIZE_MAX 1024 #define HOSTS_LINE_POS_MAX 1023 -@@ -76,12 +76,12 @@ int snoopy_datasource_domain (char * const result, cha +@@ -76,12 +78,12 @@ int snoopy_datasource_domain (char * const result, __a * START: COPY FROM datasource/hostname */ /* Get my hostname first */ diff --git a/security/snoopy/files/patch-src-datasource-tid.c b/security/snoopy/files/patch-src-datasource-tid.c deleted file mode 100644 index 240a9dc72e93..000000000000 --- a/security/snoopy/files/patch-src-datasource-tid.c +++ /dev/null @@ -1,11 +0,0 @@ ---- src/datasource/tid.c.orig 2021-04-20 15:35:54 UTC -+++ src/datasource/tid.c -@@ -49,7 +49,7 @@ - */ - int snoopy_datasource_tid (char * const result, char const * const arg) - { -- long unsigned int tid = pthread_self(); -+ long unsigned int tid = (long unsigned int) pthread_self(); - - // This happens if -lpthread is not given to compiler - if (0 == tid) { diff --git a/security/snoopy/files/patch-src-snoopy.h b/security/snoopy/files/patch-src-snoopy.h index e358ebb2a715..9dd2a425914d 100644 --- a/security/snoopy/files/patch-src-snoopy.h +++ b/security/snoopy/files/patch-src-snoopy.h @@ -1,11 +1,10 @@ ---- src/snoopy.h.orig 2021-02-09 23:00:14 UTC +--- src/snoopy.h.orig 2022-08-27 02:05:09 UTC +++ src/snoopy.h -@@ -31,8 +31,6 @@ - /* This must be the first file to be included, or implicit inclusion - * (by i.e. ) does the wrong thing +@@ -28,7 +28,6 @@ + * - prevents GCC from complaining about not using strerror_r return value + * - enables strdup() presence */ -#define _XOPEN_SOURCE 700 --#include /* Needed for GLIBC macros here */ - #include /* Needed for syslog defaults */ - #include + + diff --git a/security/snoopy/files/patch-src-util-pwd.c b/security/snoopy/files/patch-src-util-pwd.c new file mode 100644 index 000000000000..c67877f043a5 --- /dev/null +++ b/security/snoopy/files/patch-src-util-pwd.c @@ -0,0 +1,34 @@ +--- src/util/pwd.c.orig 2022-08-27 02:05:10 UTC ++++ src/util/pwd.c +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + #include + + +@@ -67,7 +68,7 @@ char * snoopy_util_pwd_convertUidToUsername (uid_t uid + return NULL; + } + +- username = malloc(LOGIN_NAME_MAX+1); ++ username = malloc(MAXLOGNAME+1); + if (NULL == username) { + free(buffpwd_uid); + return NULL; +@@ -85,11 +86,11 @@ char * snoopy_util_pwd_convertUidToUsername (uid_t uid + + // Format the return + if (NULL == pwd_uid) { +- snprintf(username, LOGIN_NAME_MAX, "user-%d", (int)uid); ++ snprintf(username, MAXLOGNAME, "user-%d", (int)uid); + } else { +- snprintf(username, LOGIN_NAME_MAX, "%s", pwd_uid->pw_name); ++ snprintf(username, MAXLOGNAME, "%s", pwd_uid->pw_name); + } +- username[LOGIN_NAME_MAX] = '\0'; // Just in case ++ username[MAXLOGNAME] = '\0'; // Just in case + + + // Return diff --git a/security/snoopy/files/patch-tests-bin-action-stress-threadsexec.c b/security/snoopy/files/patch-tests-bin-action-stress-threadsexec.c new file mode 100644 index 000000000000..bccb31f5ba3e --- /dev/null +++ b/security/snoopy/files/patch-tests-bin-action-stress-threadsexec.c @@ -0,0 +1,11 @@ +--- tests/bin/action-stress-threadsexec.c.orig 2022-09-28 19:48:05 UTC ++++ tests/bin/action-stress-threadsexec.c +@@ -178,7 +178,7 @@ int snoopyTestCli_action_stress_threadsexec (int argc, + } else { + int res; + +- res = pthread_tryjoin_np(snoopyTestCli_action_stress_threadsexec_tRepo[i], NULL); ++ res = pthread_peekjoin_np(snoopyTestCli_action_stress_threadsexec_tRepo[i], NULL); + if (res == EBUSY) { + if (verbose) printf(" M: Thread #%d has not finished executing yet.\n", i+1); + if (verbose) fflush(stdout); diff --git a/security/snoopy/files/patch-tests-bin-snoopy-test-exec-in-threads.c b/security/snoopy/files/patch-tests-bin-snoopy-test-exec-in-threads.c deleted file mode 100644 index 2474375760e4..000000000000 --- a/security/snoopy/files/patch-tests-bin-snoopy-test-exec-in-threads.c +++ /dev/null @@ -1,11 +0,0 @@ ---- tests/bin/snoopy-test-exec-in-threads.c.orig 2020-12-07 03:14:46 UTC -+++ tests/bin/snoopy-test-exec-in-threads.c -@@ -31,7 +31,7 @@ - #include - #include - #include --#include -+#include - - - diff --git a/security/snoopy/pkg-plist b/security/snoopy/pkg-plist index 2f7dd9f39e15..d3965631223d 100644 --- a/security/snoopy/pkg-plist +++ b/security/snoopy/pkg-plist @@ -2,8 +2,7 @@ etc/snoopy.ini lib/libsnoopy.so lib/libsnoopy.so.0 lib/libsnoopy.so.0.0.0 -sbin/snoopy-disable -sbin/snoopy-enable +sbin/snoopyctl %%PORTDOCS%%%%DOCSDIR%%/CONTRIBUTING.md %%PORTDOCS%%%%DOCSDIR%%/ChangeLog %%PORTDOCS%%%%DOCSDIR%%/FAQ.md