ports/50730: [PATCH] Unbreak security/logcheck
Sergei Kolobov
sergei at kolobov.com
Tue Apr 8 17:20:12 UTC 2003
>Number: 50730
>Category: ports
>Synopsis: [PATCH] Unbreak security/logcheck
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Tue Apr 08 10:20:10 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Sergei Kolobov
>Release: FreeBSD 4.7-STABLE i386
>Organization:
>Environment:
System: FreeBSD outpost.globcon.net 4.7-STABLE FreeBSD 4.7-STABLE #0: Thu Jan 2 03:13:48 MSK
>Description:
- Remove BROKEN: change temp dir from /tmp to /var/run/logcheck
(it has to be mode 700) - now complies with hier(7)
- Psionic has been acquired by Cisco in late 2002 and now
www.psionic.com is an alias to www.cisco.com. Unfortunately,
the latter does not have any mention of LogSentry or other Abacus tools,
so remove www.psionic.com from the MASTER_SITES and WWW: tag
- Reword pkg-descr to better reflect reality
- Do not use logcheck's Makefile - build/install completely from
port's Makefile
- Make PREFIX-clean
- Install useful documentation
- Take maintainership
Removed files:
- files/patch-aa
- pkg-message
>How-To-Repeat:
>Fix:
--- logcheck-1.1.1.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/security/logcheck/Makefile,v
retrieving revision 1.13
diff -u -r1.13 Makefile
--- Makefile 2003/03/23 15:15:56 1.13
+++ Makefile 2003/04/08 16:49:44
@@ -7,32 +7,50 @@
PORTNAME= logcheck
PORTVERSION= 1.1.1
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= ftp://sensimilia.eu.org/pub/software/sys/ \
http://www.ukc.mirror.ac.uk/sites/ftp.freebsd.org/pub/FreeBSD/ports/distfiles/ \
- http://www.psionic.com/downloads/ \
http://people.FreeBSD.org/~foxfair/distfiles/
DISTNAME= logsentry-${PORTVERSION}
-MAINTAINER= ports at FreeBSD.org
+MAINTAINER= sergei at kolobov.com
COMMENT= Auditing tool for system logs on Unix boxes
-BROKEN= "Changes permissions on /tmp to mode 0700"
-
USE_REINPLACE= yes
+
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
-PKGMESSAGE= ${WRKDIR}/MESSAGE
-pre-configure:
- ${REINPLACE_CMD} -e "s@/usr/local/etc/tmp@/tmp at g; \
- s@/usr/local@${PREFIX}@" ${WRKSRC}/Makefile \
+# Install binaries and config files readable to root only
+BINMODE= 700
+SHAREMODE= 600
+
+LOGCHECK_TMP?= /var/run/logcheck
+PLIST_SUB+= LOGCHECK_TMP=${LOGCHECK_TMP}
+
+CONFIG_FILES= logcheck.hacking logcheck.ignore \
+ logcheck.violations logcheck.violations.ignore
+DOCS= CREDITS INSTALL README README.how.to.interpret README.keywords
+
+do-build:
+ cd ${WRKSRC}/src && ${CC} ${CFLAGS} -o logtail logtail.c
+ ${REINPLACE_CMD} -e 's!/usr/local/bin/logtail!${PREFIX}/bin/logtail!' \
+ -e 's!/usr/local/etc/tmp!${LOGCHECK_TMP}!' \
+ -e 's!/usr/local/etc/logcheck!${PREFIX}/etc/logcheck!' \
${WRKSRC}/systems/freebsd/logcheck.sh
- ${REINPLACE_CMD} -e "s@/bin/mkdir@${MKDIR}@g" ${WRKSRC}/Makefile
-
-post-build:
- @${SED} -e 's,%%PREFIX%%,${PREFIX},g' ${PKGDIR}/pkg-message > ${PKGMESSAGE}
-post-install:
- @${CAT} ${PKGMESSAGE}
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/logtail ${PREFIX}/bin
+ ${INSTALL_SCRIPT} ${WRKSRC}/systems/freebsd/logcheck.sh ${PREFIX}/etc
+ ${MKDIR} ${EXAMPLESDIR}
+ cd ${WRKSRC}/systems/freebsd && \
+ ${INSTALL_DATA} ${CONFIG_FILES} ${EXAMPLESDIR} && \
+ ${INSTALL_DATA} ${CONFIG_FILES} ${PREFIX}/etc
+ ${TEST} -d ${LOGCHECK_TMP} || ${MKDIR} -m 700 ${LOGCHECK_TMP}
+ ${CHOWN} root:wheel ${LOGCHECK_TMP}
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+ cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
+.endif
.include <bsd.port.mk>
Index: pkg-descr
===================================================================
RCS file: /home/ncvs/ports/security/logcheck/pkg-descr,v
retrieving revision 1.1
diff -u -r1.1 pkg-descr
--- pkg-descr 1999/12/25 16:11:00 1.1
+++ pkg-descr 2003/04/08 16:49:44
@@ -1,14 +1,10 @@
Logcheck helps spot problems and security violations in your logfiles
automatically and will send the results to you in e-mail.
-Logcheck is part of the Abacus Project of security tools. It is a program
-created to help in the processing of UNIX system logfiles generated by the
-various Abacus Project tools, system daemons, Wietse Venema's TCP Wrapper
-and Log Daemon packages, and the Firewall Toolkit(c) by Trusted Information
-Systems Inc.(TIS). Logcheck also works very well at reporting on other
-common operating system security violations and strange events.
-
-WWW: http://www.psionic.com/
+It is a program created to help in the processing of UNIX system logfiles
+generated by the various system daemons. Logcheck also works very well at
+reporting on other common operating system security violations and strange
+events.
- Dan Langille
dan at freebsddiary.org
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/security/logcheck/pkg-plist,v
retrieving revision 1.4
diff -u -r1.4 pkg-plist
--- pkg-plist 2002/06/10 23:51:04 1.4
+++ pkg-plist 2003/04/08 16:49:44
@@ -1,8 +1,20 @@
bin/logtail
-etc/logcheck.hacking.sample
-etc/logcheck.ignore.sample
etc/logcheck.sh
-etc/logcheck.violations.ignore.sample
-etc/logcheck.violations.sample
- at dirrm var/tmp
- at dirrm var
+etc/logcheck.hacking
+etc/logcheck.ignore
+etc/logcheck.violations
+etc/logcheck.violations.ignore
+%%EXAMPLESDIR%%/logcheck.hacking
+%%EXAMPLESDIR%%/logcheck.ignore
+%%EXAMPLESDIR%%/logcheck.violations.ignore
+%%EXAMPLESDIR%%/logcheck.violations
+ at dirrm %%EXAMPLESDIR%%
+%%PORTDOCS%%%%DOCSDIR%%/CREDITS
+%%PORTDOCS%%%%DOCSDIR%%/INSTALL
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/README.how.to.interpret
+%%PORTDOCS%%%%DOCSDIR%%/README.keywords
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
+ at cwd /
+ at exec test -d %%LOGCHECK_TMP%% || mkdir -m 700 %%LOGCHECK_TMP%% && chown root:wheel %%LOGCHECK_TMP%%
+ at unexec rmdir %%LOGCHECK_TMP%% 2>/dev/null || true
--- logcheck-1.1.1.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list