Date: Fri, 2 Jun 2000 06:23:26 -0700 (PDT) From: Cy.Schubert@uumail.gov.bc.ca To: FreeBSD-gnats-submit@freebsd.org Subject: ports/18964: New Tripwire 1.3.1 Port Message-ID: <200006021323.e52DNQo53559@cwsys.cwsent.com>
next in thread | raw e-mail | index | archive | help
>Number: 18964 >Category: ports >Synopsis: new tripwire-1.3.1 port >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Jun 02 06:30:02 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Cy Schubert >Release: FreeBSD 4.0-STABLE i386 >Organization: UNIX Group, ITSD, ISTA, Province of BC >Environment: FreeBSD cwsys 4.0-STABLE FreeBSD 4.0-STABLE #0: Sat May 27 16:32:47 PDT 2000 root@:/usr/opt/cvs-400s-000527/src/sys/compile/CWSYS i386 >Description: New Tripwire 1.3.1 port. >How-To-Repeat: N/A >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # tripwire131 # tripwire131/files # tripwire131/files/twcheck # tripwire131/files/md5 # tripwire131/files/conf-freebsd2.h # tripwire131/files/tw.conf.freebsd2 # tripwire131/patches # tripwire131/patches/patch-ae # tripwire131/patches/patch-aa # tripwire131/patches/patch-ab # tripwire131/patches/patch-ac # tripwire131/patches/patch-ad # tripwire131/pkg # tripwire131/pkg/COMMENT # tripwire131/pkg/DESCR # tripwire131/pkg/PLIST # tripwire131/Makefile # echo c - tripwire131 mkdir -p tripwire131 > /dev/null 2>&1 echo c - tripwire131/files mkdir -p tripwire131/files > /dev/null 2>&1 echo x - tripwire131/files/twcheck sed 's/^X//' >tripwire131/files/twcheck << 'END-of-tripwire131/files/twcheck' X#! /bin/sh - X X./gunzip < tw.db_`hostname`.gz | ./tripwire -dfd 0 -c tw.config END-of-tripwire131/files/twcheck echo x - tripwire131/files/md5 sed 's/^X//' >tripwire131/files/md5 << 'END-of-tripwire131/files/md5' XMD5 (Tripwire-1.3.1-1.tar.gz) = 31025a0649e8c5123877b30d13b62143 END-of-tripwire131/files/md5 echo x - tripwire131/files/conf-freebsd2.h sed 's/^X//' >tripwire131/files/conf-freebsd2.h << 'END-of-tripwire131/files/conf-freebsd2.h' X/* $Id: conf-freebsd2.h,v 1.1.1.1 1997/04/01 04:44:00 jdp Exp $ */ X X/* X * conf-freebsd2.h X * X * Tripwire configuration file X * X * Joe Greco X * sol.net Network Services X * Derived from the other BSD config.h's X */ X X/*** X *** Operating System specifics X *** X *** If the answer to a question in the comment is "Yes", then X *** change the corresponding "#undef" to a "#define" X ***/ X X/* X * is your OS a System V derivitive? if so, what version? X * (e.g., define SYSV 4) X */ X X#undef SYSV X X/* X * does your system have a <malloc.h> like System V? X */ X X#undef MALLOCH X X/* X * does your system have a <stdlib.h> like POSIX says you should? X */ X X#define STDLIBH X X/* X * does your system use readdir(3) that returns (struct dirent *)? X */ X X#define DIRENT X X/* X * is #include <string.h> ok? (as opposed to <strings.h>) X */ X X#define STRINGH X X/* X * does your system have gethostname(2) (instead of uname(2))? X */ X X#define GETHOSTNAME END-of-tripwire131/files/conf-freebsd2.h echo x - tripwire131/files/tw.conf.freebsd2 sed 's/^X//' >tripwire131/files/tw.conf.freebsd2 << 'END-of-tripwire131/files/tw.conf.freebsd2' X# $Id: tw.conf.freebsd2,v 1.3 1998/07/28 17:54:21 obrien Exp $ X# X# tripwire.config X# Generic version for FreeBSD X# Will need editing...see comments below X# X# This file contains a list of files and directories that System X# Preener will scan. Information collected from these files will be X# stored in the tripwire.database file. X# X# Format: [!|=] entry [ignore-flags] X# X# where: '!' signifies the entry is to be pruned (inclusive) from X# the list of files to be scanned. X# '=' signifies the entry is to be added, but if it is X# a directory, then all its contents are pruned X# (useful for /tmp). X# X# where: entry is the absolute pathname of a file or a directory X# X# where ignore-flags are in the format: X# [template][ [+|-][pinugsam12] ... ] X# X# - : ignore the following atributes X# + : do not ignore the following attributes X# X# p : permission and file mode bits a: access timestamp X# i : inode number m: modification timestamp X# n : number of links (ref count) c: inode creation timestamp X# u : user id of owner 1: signature 1 X# g : group id of owner 2: signature 2 X# s : size of file X# X# X# Ex: The following entry will scan all the files in /etc, and report X# any changes in mode bits, inode number, reference count, uid, X# gid, modification and creation timestamp, and the signatures. X# However, it will ignore any changes in the access timestamp. X# X# /etc +pinugsm12-a X# X# The following templates have been pre-defined to make these long ignore X# mask descriptions unecessary. X# X# Templates: (default) R : [R]ead-only (+pinugsm12-a) X# L : [L]og file (+pinug-sam12) X# N : ignore [N]othing (+pinusgsamc12) X# E : ignore [E]verything (-pinusgsamc12) X# X# By default, Tripwire uses the R template -- it ignores X# only the access timestamp. X# X# You can use templates with modifiers, like: X# Ex: /etc/lp E+ug X# X# Example configuration file: X# /etc R # all system files X# !/etc/lp R # ...but not those logs X# =/tmp N # just the directory, not its files X# X# Note the difference between pruning (via "!") and ignoring everything X# (via "E" template): Ignoring everything in a directory still monitors X# for added and deleted files. Pruning a directory will prevent Tripwire X# from even looking in the specified directory. X# X# X# Tripwire running slowly? Modify your tripwire.config entries to X# ignore the (signature 2) attribute when this computationally-exorbitant X# protection is not needed. (See README and design document for further X# details.) X# X X# First, root's traditional "home". Note that FreeBSD's root's home (/root) X# is protected by R-2 protections in the default config file. X=/ L X/.rhosts R # may not exist X/.profile R # may not exist X/.cshrc R # may not exist X/.login R # may not exist X/.exrc R # may not exist X/.logout R # may not exist X/.forward R # may not exist X X# Unix itself X/kernel R X X# /bin X/bin R-2 X X# /dev X/dev L X X# /etc X/etc R-2 X/etc/aliases L X/etc/dumpdates L X/etc/motd L X X# my passwd database should be static at time of system build. yours may X# not be, if not, uncomment the lines below. X X# /etc/passwd L X# /etc/master.passwd L X# /etc/pwd.db L X# /etc/spwd.db L X X# /home X=/home X X# /lkm X/lkm R-2 X X# /root X/root R-2 X/root/.history L X X# /sbin X/sbin R-2 X X# /stand X/stand R-2 X X# /usr/bin X/usr/bin R-2 X X/usr/include R-12 X X/usr/lib R-2 X X/usr/libdata R-2 X X/usr/libexec R-2 X X/usr/local/bin R-2 X X/usr/local/etc L X X/usr/local/lib R-2 X X/usr/local/libexec R-2 X X/usr/local/sbin R-2 X X/usr/local/share R-2 X X/usr/sbin R-2 X X/usr/share R-2 X X########################################### END-of-tripwire131/files/tw.conf.freebsd2 echo c - tripwire131/patches mkdir -p tripwire131/patches > /dev/null 2>&1 echo x - tripwire131/patches/patch-ae sed 's/^X//' >tripwire131/patches/patch-ae << 'END-of-tripwire131/patches/patch-ae' X--- Makefile.orig Tue May 4 01:31:00 1999 X+++ Makefile Thu May 11 19:51:30 2000 X@@ -60,8 +60,8 @@ X #CPP = /lib/cpp # on older systems X X # make sure libraries are not linked dynamically (as a security measure) X-#LDFLAGS= -static # Most systems, Linux / RedHat 5.2 and previous X-LDFLAGS= -ldl # Solaris 2.x, Redhat 6.0 X+LDFLAGS= -static # Most systems, Linux / RedHat 5.2 and previous X+#LDFLAGS= -ldl # Solaris 2.x, Redhat 6.0 X # common X #LDFLAGS= -non_shared # OSF/1 X #LDFLAGS= -Bstatic # SunOS 4 (cannot statically link tripwire END-of-tripwire131/patches/patch-ae echo x - tripwire131/patches/patch-aa sed 's/^X//' >tripwire131/patches/patch-aa << 'END-of-tripwire131/patches/patch-aa' X*** include/config.h.orig Fri Jul 15 06:02:52 1994 X--- include/config.h Sun Dec 31 18:56:20 1989 X*************** X*** 17,23 **** X *** file that corresponds with your operating system. X ***/ X X! #include "../configs/conf-svr4.h" X X #ifdef TW_TYPE32 X typedef TW_TYPE32 int32; X--- 17,23 ---- X *** file that corresponds with your operating system. X ***/ X X! #include "../configs/conf-freebsd2.h" X X #ifdef TW_TYPE32 X typedef TW_TYPE32 int32; X*************** X*** 103,110 **** X #endif X */ X X! #define CONFIG_PATH "/usr/local/bin/tw" X! #define DATABASE_PATH "/var/tripwire" X X /******* name of Tripwire files ************************************** X * X--- 103,110 ---- X #endif X */ X X! # define CONFIG_PATH "/var/adm/tcheck" X! # define DATABASE_PATH "/var/adm/tcheck/databases" X X /******* name of Tripwire files ************************************** X * END-of-tripwire131/patches/patch-aa echo x - tripwire131/patches/patch-ab sed 's/^X//' >tripwire131/patches/patch-ab << 'END-of-tripwire131/patches/patch-ab' X--- Makefile.orig Tue May 4 01:31:00 1999 X+++ Makefile Thu May 11 19:44:50 2000 X@@ -10,11 +10,11 @@ X ### X X # destination directory for final executables X-DESTDIR = /usr/local/bin/tw X-DATADIR = /var/tripwire X+DESTDIR = /usr/local/bin X+DATADIR = /var/adm/tcheck X X # destination for man pages X-MANDIR = /usr/man # This needs to change to reflect the path X+MANDIR = /usr/local/man # This needs to change to reflect the path X # on your system X X # system utilities X@@ -109,10 +109,8 @@ X $(INSTALL) -d $(DESTDIR) X (cd src; make INSTALL=$(INSTALL) DESTDIR=$(DESTDIR) install) X (cd man; make INSTALL=$(INSTALL) MANDIR=$(MANDIR) install) X- (cd configs; $(INSTALL) -m 444 tw.config $(DESTDIR)) X- chmod 555 $(DESTDIR) X $(INSTALL) -m 0755 -d $(DATADIR) X- $(INSTALL) -m 444 tests/tw.db_TEST $(DATADIR) X+ (cd configs; $(INSTALL) -m 444 tw.config $(DATADIR)) X X test: all X (cd tests; make HOSTNAME=$(HOSTNAME) DIST=$(DIST) SHELL=$(SHELL) \ END-of-tripwire131/patches/patch-ab echo x - tripwire131/patches/patch-ac sed 's/^X//' >tripwire131/patches/patch-ac << 'END-of-tripwire131/patches/patch-ac' XThis patch eliminates a compiler warning about LITTLE_ENDIAN begin Xredefined. X X*** sigs/sha/sha.c.orig Mon Jul 25 08:46:45 1994 X--- sigs/sha/sha.c Mon Mar 31 19:55:23 1997 X*************** X*** 47,52 **** X--- 47,54 ---- X #include "sha.h" X X #if BYTEORDER == 0x1234 X+ #undef BIG_ENDIAN X+ #undef LITTLE_ENDIAN X #define LITTLE_ENDIAN X #endif X END-of-tripwire131/patches/patch-ac echo x - tripwire131/patches/patch-ad sed 's/^X//' >tripwire131/patches/patch-ad << 'END-of-tripwire131/patches/patch-ad' X--- src/Makefile.orig Tue May 4 01:31:00 1999 X+++ src/Makefile Thu May 11 19:49:21 2000 X@@ -104,8 +104,8 @@ X $(CC) $(CFLAGS) -c $< X X install: tripwire X- $(INSTALL) -m 555 tripwire $(DESTDIR) X- $(INSTALL) -m 555 siggen $(DESTDIR) X+ $(INSTALL) -f noschg -s -m 555 tripwire $(DESTDIR) X+ $(INSTALL) -f noschg -s -m 555 siggen $(DESTDIR) X X clean: X -rm -f $(OFILES) config.lex.c config.pre.c y.tab.c lex.yy.c help.c \ END-of-tripwire131/patches/patch-ad echo c - tripwire131/pkg mkdir -p tripwire131/pkg > /dev/null 2>&1 echo x - tripwire131/pkg/COMMENT sed 's/^X//' >tripwire131/pkg/COMMENT << 'END-of-tripwire131/pkg/COMMENT' XFile system security and verification program. END-of-tripwire131/pkg/COMMENT echo x - tripwire131/pkg/DESCR sed 's/^X//' >tripwire131/pkg/DESCR << 'END-of-tripwire131/pkg/DESCR' XTripwire is a tool that aids system administrators and Xusers in monitoring a designated set of files for any changes. XUsed with system files on a regular (e.g., daily) basis, Tripwire Xcan notify system administrators of corrupted or tampered files, Xso damage control measures can be taken in a timely manner. X XIf "TRIPWIRE_FLOPPY" is set to "YES" in the environment or on the X"make" command line, this port will write the tripwire database to Xa floppy disk, which should then be write-protected and used as a Xreference for future runs. The diskette should be formatted and Xpresent in the "A" drive before starting the "make install" step. X XJoe Greco <jgreco@ns.sol.net> END-of-tripwire131/pkg/DESCR echo x - tripwire131/pkg/PLIST sed 's/^X//' >tripwire131/pkg/PLIST << 'END-of-tripwire131/pkg/PLIST' Xbin/tripwire Xbin/siggen END-of-tripwire131/pkg/PLIST echo x - tripwire131/Makefile sed 's/^X//' >tripwire131/Makefile << 'END-of-tripwire131/Makefile' X# New ports collection makefile for: tripwire 1.3 X# Version required: 1.3-1 X# Date created: Fri Mar 19 18:29:18 1999 X# Whom: Cy Schubert <Cy.Schubert@uumail.gov.bc.ca> X# X# $Id: Makefile,v 1.4 1998/12/01 08:33:29 asami Exp $ X# X XPORTNAME= tripwire XPORTVERSION= 1.3.1-1 XCATEGORIES= security net XDISTNAME= Tripwire-${PORTVERSION} XWRKSRC= ${WRKDIR}/tw_ASR_1.3.1_src X XMAINTAINER= Cy.Schubert@uumail.gov.bc.ca X XMAN5= tw.config.5 XMAN8= siggen.8 tripwire.8 XNO_CDROM= "cannot be redistributed for more than the cost of duplication" XNO_PACKAGE= "requires local database to be built" XRESTRICTED= "contains crypto class algorithms" X X.include <bsd.port.pre.mk> X X.if !exists(${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}) XIGNORE='Please read http://www.tripwiresecurity.com/ for details of how to obtain the Tripwire source. Put the file ${DISTNAME}${EXTRACT_SUFX} into the directory ${DISTDIR} and run make again.' X.endif X Xpre-configure: X @ ${CP} ${FILESDIR}/conf-freebsd2.h ${WRKSRC}/configs X @ ${CP} ${FILESDIR}/tw.conf.freebsd2 ${WRKSRC}/configs/tw.conf.freebsd2 X Xpost-install: X @ ${MKDIR} /var/adm/tcheck X @ ${CP} ${FILESDIR}/tw.conf.freebsd2 /var/adm/tcheck/tw.config X @ ${ECHO} Creating tripwire database X @ (cd /var/adm/tcheck; tripwire -initialize) X.if defined(TRIPWIRE_FLOPPY) && ${TRIPWIRE_FLOPPY} == YES X @ disklabel -w -B /dev/rfd0c fd1440 X @ newfs -u 0 -t 0 -i 196608 -m 0 -T minimum -o space /dev/rfd0c X @ mount /dev/fd0c /mnt X @ ${GZIP_CMD} < ${PREFIX}/bin/tripwire > /mnt/tripwire X @ ${CP} -p /var/adm/tcheck/tw.config /mnt/tw.config X @ ${GZIP_CMD} < /var/adm/tcheck/databases/tw.db_`hostname` \ X > /mnt/tw.db_`hostname`.gz X @ ${CP} -p ${FILESDIR}/twcheck /mnt/twcheck X @ ${GZIP_CMD} < /usr/bin/gunzip > /mnt/gunzip X @ chmod 555 /mnt/tripwire /mnt/gunzip /mnt/twcheck X @ umount /mnt X @ ${ECHO} Do not forget to remove and write-protect the floppy. X.endif X X.include <bsd.port.post.mk> END-of-tripwire131/Makefile exit >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200006021323.e52DNQo53559>