pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security prelude-pflogger: Remove. This relies on CTL...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3d1c1c797437
branches:  trunk
changeset: 378781:3d1c1c797437
user:      nia <nia%pkgsrc.org@localhost>
date:      Thu May 05 12:23:06 2022 +0000

description:
prelude-pflogger: Remove.  This relies on CTL_IPPROTO_NAMES which
was removed from the BSDs years ago, so it no longer builds.

diffstat:

 security/Makefile                                      |    3 +-
 security/prelude-pflogger/DESCR                        |    2 -
 security/prelude-pflogger/MESSAGE                      |    7 -
 security/prelude-pflogger/Makefile                     |   76 -------
 security/prelude-pflogger/PLIST                        |    4 -
 security/prelude-pflogger/distinfo                     |    8 -
 security/prelude-pflogger/files/pflogger.sh            |   26 --
 security/prelude-pflogger/files/run-prelude-pflogger.c |  166 -----------------
 security/prelude-pflogger/patches/patch-aa             |   25 --
 security/prelude-pflogger/patches/patch-ab             |   25 --
 security/prelude-pflogger/patches/patch-ac             |   21 --
 11 files changed, 1 insertions(+), 362 deletions(-)

diffs (truncated from 417 to 300 lines):

diff -r a8fa506b3a26 -r 3d1c1c797437 security/Makefile
--- a/security/Makefile Thu May 05 12:20:34 2022 +0000
+++ b/security/Makefile Thu May 05 12:23:06 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.858 2022/04/26 08:18:54 adam Exp $
+# $NetBSD: Makefile,v 1.859 2022/05/05 12:23:06 nia Exp $
 #
 
 COMMENT=       Security and cryptography tools and libraries
@@ -416,7 +416,6 @@
 SUBDIR+=       prelude-correlator
 SUBDIR+=       prelude-lml
 SUBDIR+=       prelude-manager
-SUBDIR+=       prelude-pflogger
 SUBDIR+=       priv
 SUBDIR+=       prngd
 SUBDIR+=       pscan
diff -r a8fa506b3a26 -r 3d1c1c797437 security/prelude-pflogger/DESCR
--- a/security/prelude-pflogger/DESCR   Thu May 05 12:20:34 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-Prelude sensor for OpenBSD's PF (Packet Filter)
-that reports to Prelude Manager.
diff -r a8fa506b3a26 -r 3d1c1c797437 security/prelude-pflogger/MESSAGE
--- a/security/prelude-pflogger/MESSAGE Thu May 05 12:20:34 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-===========================================================================
-$NetBSD: MESSAGE,v 1.1.1.1 2007/09/03 13:50:49 shannonjr Exp $
-
-You need to ensure that the permissions on /dev/bpf0 are set to allow
-read access by ${PRELUDE_USER}:${PRELUDE_GROUP}.
-
-===========================================================================
diff -r a8fa506b3a26 -r 3d1c1c797437 security/prelude-pflogger/Makefile
--- a/security/prelude-pflogger/Makefile        Thu May 05 12:20:34 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-# $NetBSD: Makefile,v 1.27 2021/12/08 16:06:22 adam Exp $
-#
-
-DISTNAME=      prelude-pflogger-0.9.0-rc2
-PKGNAME=       prelude-pflogger-0.9.0
-PKGREVISION=   16
-CATEGORIES=    security
-#MASTER_SITES= http://prelude-ids.org/download/releases/
-
-MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
-#HOMEPAGE=     http://prelude-ids.org/download/releases/
-COMMENT=       Prelude sensor for Packet Filter (pf)
-
-.include "../../mk/bsd.prefs.mk"
-
-PRELUDE_USER?=         _prelude
-PRELUDE_GROUP?=                _prelude
-PRELUDE_PFLOGGER_PID_DIR=      ${VARBASE}/run/prelude-pflogger
-
-PKG_GROUPS_VARS+=      PRELUDE_GROUP
-PKG_USERS_VARS+=       PRELUDE_USER
-
-EGDIR=                 ${PREFIX}/share/examples/prelude-pflogger
-REQD_DIRS=             ${EGDIR} ${PKG_SYSCONFDIR}
-
-USE_PKGLOCALEDIR=      yes
-USE_LIBTOOL=           yes
-GNU_CONFIGURE=         yes
-USE_TOOLS+=            gmake
-BUILD_DEFS+=           VARBASE
-PKG_SYSCONFSUBDIR=     prelude-pflogger
-CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFDIR:Q}
-CONFIGURE_ARGS+=       --with-html-dir=${PREFIX}/share/doc
-CONFIGURE_ARGS+=       --localstatedir=${VARBASE:Q}
-CONF_FILES=            ${EGDIR}/prelude-pflogger.conf ${PKG_SYSCONFDIR}/prelude-pflogger.conf
-USE_TOOLS+=            autoconf automake aclocal autoheader
-
-FILES_SUBST+=  PRELUDE_PFLOGGER_PID_DIR=${PRELUDE_PFLOGGER_PID_DIR:Q}
-FILES_SUBST+=  PRELUDE_USER=${PRELUDE_USER:Q}
-FILES_SUBST+=  PRELUDE_GROUP=${PRELUDE_GROUP:Q}
-
-MESSAGE_SUBST+=        PRELUDE_USER=${PRELUDE_USER:Q}
-MESSAGE_SUBST+=        PRELUDE_GROUP=${PRELUDE_GROUP:Q}
-
-SUBST_CLASSES+=                code
-SUBST_STAGE.code=      pre-configure
-SUBST_FILES.code=      run-prelude-pflogger.c
-SUBST_VARS.code=       PREFIX
-SUBST_VARS.code+=      PRELUDE_USER
-
-SUBST_CLASSES+=                make
-SUBST_STAGE.make=      pre-configure
-SUBST_FILES.make=      Makefile.am
-SUBST_VARS.make=       EGDIR
-
-RCD_SCRIPTS=           pflogger
-
-INSTALLATION_DIRS=     share/examples/prelude-pflogger sbin
-
-pre-patch:
-       ${CP} ${FILESDIR}/run-prelude-pflogger.c ${WRKSRC}
-
-pre-configure:
-       set -e; cd ${WRKSRC}; \
-       aclocal; autoheader; automake -a --foreign -i; autoconf
-       ${LN} -s ${BUILDLINK_DIR}/lib/libltdl.so ${BUILDLINK_DIR}/lib/libltdlc.so
-
-post-build:
-       cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${CC} ${CFLAGS} -o run-prelude-pflogger run-prelude-pflogger.c
-
-post-install:
-       ${INSTALL_PROGRAM} ${WRKSRC}/run-prelude-pflogger ${DESTDIR}${PREFIX}/sbin/run-prelude-pflogger
-
-.include "../../security/libprelude/buildlink3.mk"
-.include "../../devel/libltdl/buildlink3.mk"
-.include "../../mk/bsd.pkg.mk"
diff -r a8fa506b3a26 -r 3d1c1c797437 security/prelude-pflogger/PLIST
--- a/security/prelude-pflogger/PLIST   Thu May 05 12:20:34 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-@comment $NetBSD: PLIST,v 1.3 2014/03/11 14:05:14 jperkin Exp $
-bin/prelude-pflogger
-sbin/run-prelude-pflogger
-share/examples/prelude-pflogger/prelude-pflogger.conf
diff -r a8fa506b3a26 -r 3d1c1c797437 security/prelude-pflogger/distinfo
--- a/security/prelude-pflogger/distinfo        Thu May 05 12:20:34 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-$NetBSD: distinfo,v 1.10 2021/10/26 11:17:39 nia Exp $
-
-BLAKE2s (prelude-pflogger-0.9.0-rc2.tar.gz) = 1b5417ac27dc6aefd4b3518f491f45329fa4150715a39475a52a0505d624e7a4
-SHA512 (prelude-pflogger-0.9.0-rc2.tar.gz) = 5f73ac0b37c4e95cf1c2316ca6ec3efb02047f5e63a8dd527f66ea9b018ddf7e5952aa68595609b99a30358010aec6a4bf8c8d0c194b02e28bb717b90816e214
-Size (prelude-pflogger-0.9.0-rc2.tar.gz) = 303763 bytes
-SHA1 (patch-aa) = b7f7623e75c324e593aec10d921ee5364a2fa542
-SHA1 (patch-ab) = e13fe4c090a1bb17fc552a0c6ca061da0f7ad1a4
-SHA1 (patch-ac) = 105160b3ea38d70b6b845612d9027b3ace050204
diff -r a8fa506b3a26 -r 3d1c1c797437 security/prelude-pflogger/files/pflogger.sh
--- a/security/prelude-pflogger/files/pflogger.sh       Thu May 05 12:20:34 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-#!@RCD_SCRIPTS_SHELL@
-#
-# $NetBSD: pflogger.sh,v 1.3 2011/10/07 22:37:05 shattered Exp $
-#
-
-# PROVIDE: preludepflogger
-# REQUIRE: LOGIN
-
-$_rc_subr_loaded . /etc/rc.subr
-
-name="pflogger"
-procname="@PREFIX@/bin/prelude-pflogger"
-rcvar=${name}
-required_files="@PKG_SYSCONFDIR@/prelude-pflogger/prelude-pflogger.conf"
-start_precmd="pflogger_precommand"
-start_cmd="@PREFIX@/sbin/run-prelude-pflogger --pidfile @PRELUDE_PFLOGGER_PID_DIR@/prelude-pflogger.pid"
-pidfile="@PRELUDE_PFLOGGER_PID_DIR@/prelude-pflogger.pid"
-
-pflogger_precommand()
-{
-       /bin/mkdir -p @PRELUDE_PFLOGGER_PID_DIR@
-       /usr/sbin/chown @PRELUDE_USER@:@PRELUDE_GROUP@ @PRELUDE_PFLOGGER_PID_DIR@
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff -r a8fa506b3a26 -r 3d1c1c797437 security/prelude-pflogger/files/run-prelude-pflogger.c
--- a/security/prelude-pflogger/files/run-prelude-pflogger.c    Thu May 05 12:20:34 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,166 +0,0 @@
-#define PRELUDE_PFLOGGER_USER "@PRELUDE_USER@"
-#define PRELUDE_PFLOGGER_PATH "@PREFIX@/bin/prelude-pflogger"
-
-#include <unistd.h>
-#include <string.h>
-#include <stdio.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <sys/wait.h>
-#include <pwd.h>
-#include <syslog.h>
-
-#define MAX_ARGS 40
-#ifndef         TRUE
-#define         TRUE                            1
-#endif                          /* TRUE */
-
-#ifndef         FALSE
-#define         FALSE                           0
-#endif                          /* FALSE */
-
-
-void error_sys(char *str)
-
-{
-    /* Output error message to syslog */
-    char msg[1024];
-    snprintf(msg, sizeof(msg), "run-prelude-pflogger : %s : %s", str, strerror(errno));
-    syslog(LOG_ALERT, msg);
-
-}
-
-
-int obtainUIDandGID(const char *name, uid_t *pw_uid, gid_t *pw_gid)
-{
-    /* Obtain UID and GID from passwd entry identified by name */
-    struct passwd *pw_entry;
-    char msg[100];
-
-    if ((pw_entry = getpwnam(name)) == NULL)
-    {
-        snprintf(msg, sizeof(msg), "failed to get password entry for %s", name);
-        error_sys(msg);
-        return FALSE;
-    }
-    else
-    {
-        *pw_uid = pw_entry->pw_uid;
-        *pw_gid = pw_entry->pw_gid;
-        return TRUE;
-
-    }
-}
-
-
-int main (int argc, char **argv )
-
-{
-
-    pid_t pid;
-    uid_t UID;
-    gid_t GID;
-    pid_t pidwait;
-    int waitstat;
-    int s;
-    int max_fd;
-
-    /* Sanity check */
-    if (argc > MAX_ARGS)
-    {
-        error_sys("arg buffer too small");
-        exit(-1);
-    }
-
-    if (geteuid() != 0)
-    {
-        error_sys("must be called by root");
-        exit(-1);
-    }
-
-    /* fork child that will become prelude-pflogger */
-    if ((pid = fork()) < 0)
-
-        error_sys("fork error");
-
-    else
-
-    {
-
-        if (pid == 0)
-
-        {
-
-            /* We're the child */
-            char *args[MAX_ARGS];
-            unsigned int i;
-
-            /* Become session leader */
-            setsid();
-
-            /* Change working directory to root directory.
-               The current working directory could be a mounted
-               filesystem; if the daemon stays on a mounted
-               filesystem it could prevent the filesystem from
-               being umounted. */
-            chdir("/");
-
-            /* Clear out file creation mask */
-            umask(0);
-
-            /* Close unneeded file descriptors */
-            max_fd = (int) sysconf(_SC_OPEN_MAX);
-            if (max_fd == -1)
-                max_fd = getdtablesize();
-            for (s = 3; s < max_fd; s++)
-                (void) close(s);
-
-            if (!obtainUIDandGID(PRELUDE_PFLOGGER_USER, &UID, &GID))
-                exit(-1);
-
-            /* Drop privileges immediately */
-            if (setgid(GID) < 0)
-            {
-                /* It is VERY important to check return
-                   value and not continue if setgid fails
-                */
-                error_sys ("setgid failed");
-                exit (-1);
-            }
-
-            if (setuid(UID) < 0)
-            {



Home | Main Index | Thread Index | Old Index