diff options
author | agc <agc@pkgsrc.org> | 1999-04-09 10:46:55 +0000 |
---|---|---|
committer | agc <agc@pkgsrc.org> | 1999-04-09 10:46:55 +0000 |
commit | b84f0d7f725949d67d68e34937df97062e3f7f42 (patch) | |
tree | 3f6943acbbea32db305036a3641fcf486ca8a956 /security/tripwire | |
parent | 4138f4e4d8e7ce666bd603f2b1f5a08331da65bc (diff) | |
download | pkgsrc-b84f0d7f725949d67d68e34937df97062e3f7f42.tar.gz |
Make this package work on Solaris.
Diffstat (limited to 'security/tripwire')
-rw-r--r-- | security/tripwire/Makefile | 13 | ||||
-rw-r--r-- | security/tripwire/files/conf-solaris.h | 54 | ||||
-rw-r--r-- | security/tripwire/files/tw.conf.solaris | 150 | ||||
-rw-r--r-- | security/tripwire/patches/patch-aa | 22 | ||||
-rw-r--r-- | security/tripwire/patches/patch-ab | 10 | ||||
-rw-r--r-- | security/tripwire/patches/patch-ac | 27 |
6 files changed, 256 insertions, 20 deletions
diff --git a/security/tripwire/Makefile b/security/tripwire/Makefile index f97d5bfa579..2f8de540987 100644 --- a/security/tripwire/Makefile +++ b/security/tripwire/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1.1.1 1998/11/17 16:27:25 agc Exp $ +# $NetBSD: Makefile,v 1.2 1999/04/09 10:46:55 agc Exp $ # DISTNAME= tripwire-1.2 @@ -11,17 +11,20 @@ HOMEPAGE= http://www.cs.purdue.edu/coast/coast-library.html post-extract: (cd ${WRKDIR}; /bin/pax -r < T1.2.tar) - ${CP} ${FILESDIR}/conf-netbsd.h ${WRKSRC}/configs + ${CP} ${FILESDIR}/conf-${LOWER_OPSYS}.h ${WRKSRC}/configs post-patch: ${MV} ${WRKSRC}/include/config.h ${WRKSRC}/include/config.h.in - ${SED} -e 's|@localbase@|${LOCALBASE}|g' ${WRKSRC}/include/config.h.in \ - > ${WRKSRC}/include/config.h + ${SED} -e 's|@localbase@|${LOCALBASE}|g' \ + -e 's|@LOWER_OPSYS@|${LOWER_OPSYS}|g' \ + ${WRKSRC}/include/config.h.in > ${WRKSRC}/include/config.h + +PRE_ROOT_CMD= ${CHMOD} -R go+rwx ${WRKDIR} post-install: ${MKDIR} ${PREFIX}/share/doc/tripwire ${PREFIX}/etc/tripwire/databases ${INSTALL_MAN} ${WRKSRC}/docs/designdoc.ps ${PREFIX}/share/doc/tripwire ${SED} -e 's|@localbase@|${LOCALBASE}|g' -e 's|@x11base@|${X11BASE}|g' \ - ${FILESDIR}/tw.conf.netbsd > ${PREFIX}/etc/tripwire/tripwire.conf + ${FILESDIR}/tw.conf.${LOWER_OPSYS} > ${PREFIX}/etc/tripwire/tripwire.conf .include "../../mk/bsd.pkg.mk" diff --git a/security/tripwire/files/conf-solaris.h b/security/tripwire/files/conf-solaris.h new file mode 100644 index 00000000000..d54b3375880 --- /dev/null +++ b/security/tripwire/files/conf-solaris.h @@ -0,0 +1,54 @@ +/* Original Id: conf-bsd.h,v 1.2 1993/08/19 05:26:52 genek Exp */ + +/* + * conf-bsd.h + * + * Tripwire configuration file + * + * Gene Kim + * Purdue University + */ + +/*** + *** Operating System specifics + *** + *** If the answer to a question in the comment is "Yes", then + *** change the corresponding "#undef" to a "#define" + ***/ + +/* + * is your OS a System V derivitive? if so, what version? + * (e.g., define SYSV 4) + */ + +#define SYSV 4 + +/* + * does your system have a <malloc.h> like System V? + */ + +#define MALLOCH + +/* + * does your system have a <stdlib.h> like POSIX says you should? + */ + +#define STDLIBH + +/* + * does your system use readdir(3) that returns (struct dirent *)? + */ + +#define DIRENT + +/* + * is #include <string.h> ok? (as opposed to <strings.h>) + */ + +#define STRINGH + +/* + * does your system have gethostname(2) (instead of uname(2))? + */ + +#undef GETHOSTNAME diff --git a/security/tripwire/files/tw.conf.solaris b/security/tripwire/files/tw.conf.solaris new file mode 100644 index 00000000000..0974178e338 --- /dev/null +++ b/security/tripwire/files/tw.conf.solaris @@ -0,0 +1,150 @@ +# $NetBSD: tw.conf.solaris,v 1.1 1999/04/09 10:46:56 agc Exp $ +# Original Id: tw.conf.386bsd,v 1.1 1993/11/22 06:38:01 genek Exp +# +# tripwire.config +# Generic version for NetBSD +# Will need editing...see comments below +# +# This file contains a list of files and directories that System +# Preener will scan. Information collected from these files will be +# stored in the tripwire.database file. +# +# Format: [!|=] entry [ignore-flags] +# +# where: '!' signifies the entry is to be pruned (inclusive) from +# the list of files to be scanned. +# '=' signifies the entry is to be added, but if it is +# a directory, then all its contents are pruned +# (useful for /tmp). +# +# where: entry is the absolute pathname of a file or a directory +# +# where ignore-flags are in the format: +# [template][ [+|-][pinugsam12] ... ] +# +# - : ignore the following atributes +# + : do not ignore the following attributes +# +# p : permission and file mode bits a: access timestamp +# i : inode number m: modification timestamp +# n : number of links (ref count) c: inode creation timestamp +# u : user id of owner 1: signature 1 +# g : group id of owner 2: signature 2 +# s : size of file +# +# +# Ex: The following entry will scan all the files in /etc, and report +# any changes in mode bits, inode number, reference count, uid, +# gid, modification and creation timestamp, and the signatures. +# However, it will ignore any changes in the access timestamp. +# +# /etc +pinugsm12-a +# +# The following templates have been pre-defined to make these long ignore +# mask descriptions unecessary. +# +# Templates: (default) R : [R]ead-only (+pinugsm12-a) +# L : [L]og file (+pinug-sam12) +# N : ignore [N]othing (+pinusgsamc12) +# E : ignore [E]verything (-pinusgsamc12) +# +# By default, Tripwire uses the R template -- it ignores +# only the access timestamp. +# +# You can use templates with modifiers, like: +# Ex: /etc/lp E+ug +# +# Example configuration file: +# /etc R # all system files +# !/etc/lp R # ...but not those logs +# =/tmp N # just the directory, not its files +# +# Note the difference between pruning (via "!") and ignoring everything +# (via "E" template): Ignoring everything in a directory still monitors +# for added and deleted files. Pruning a directory will prevent Tripwire +# from even looking in the specified directory. +# +# +# Tripwire running slowly? Modify your tripwire.config entries to +# ignore the (signature 2) attribute when this computationally-exorbitant +# protection is not needed. (See README and design document for further +# details.) +# + +# First, root's "home" +=/ L +/root/.rhosts R # may not exist +/root/.profile R # may not exist +/root/.cshrc R # may not exist +/root/.login R # may not exist +/root/.exrc R # may not exist +/root/.logout R # may not exist +/root/.emacs R # may not exist +/root/.forward R # may not exist +/root/.netrc R # may not exist + +# Unix itself +/netbsd R + +# /bin and exceptions +/bin R-2 +/bin/rcp R + +# /dev +/dev L + +# /etc and exceptions +/etc R-2 +/etc/aliases L +/etc/daily L +/etc/disktab L +/etc/dumpdates L +/etc/master.passwd L +/etc/monthly L +/etc/motd L +/etc/passwd L +/etc/pwd.db L +/etc/spwd.db L +/etc/uucp L +/etc/weekly L + +# /home +=/home + +# /root +/root R-2 +/root/.history L + +# /sbin +/sbin R-2 + +# /usr/bin +/usr/bin R-2 + +/usr/include R-12 + +/usr/lib R-2 + +/usr/libexec R-2 + +/usr/local/bin R-2 + +/usr/local/etc L + +/usr/sbin R-2 + +/usr/src/bin R-2 +/usr/src/lib R-2 +/usr/src/libexec R-2 +/usr/src/sbin R-2 +/usr/src/usr.bin R-2 +/usr/src/usr.sbin R-2 +/usr/src/sys R-2 +!/usr/src/sys/arch/i386/compile +!/usr/src/sys/arch/i386/conf + +# packages... +=@localbase@ +=@x11base@ + +########################################### diff --git a/security/tripwire/patches/patch-aa b/security/tripwire/patches/patch-aa index 0c7d6cb78ad..92d631690ad 100644 --- a/security/tripwire/patches/patch-aa +++ b/security/tripwire/patches/patch-aa @@ -1,4 +1,4 @@ -$NetBSD: patch-aa,v 1.1.1.1 1998/11/17 16:27:25 agc Exp $ +$NetBSD: patch-aa,v 1.2 1999/04/09 10:46:56 agc Exp $ Miscellaneous Makefile settings. @@ -17,6 +17,17 @@ Miscellaneous Makefile settings. # system utilities LEX = lex +@@ -32,8 +32,8 @@ + #SHELL = /bin/bash # For the GNU fanatics + + # you can use ANSI C if you like, but K&R is equally fine. +-CC = cc # common +-#CC = gcc # also common ++#CC = cc # common ++CC = gcc # also common + #CC = /usr/ccs/bin/cc # Pyramid DC/OSx (SVR4) + + CFLAGS = -O # common @@ -48,7 +48,7 @@ #CFLAGS = -systype bsd43 # ETA/10 (SVR3) #CFLAGS = -systype bsd43 # MIPS RISC/OS 4.5x @@ -26,3 +37,12 @@ Miscellaneous Makefile settings. #CFLAGS = -OG # Pyramid OSx #CFLAGS = -O -Kold # Pyramid DC/OSx (SVR4) #CFLAGS = -DTW_TYPE32='int' # DEC OSF/1 Alpha (or any other architecture +@@ -77,7 +77,7 @@ + + # If you don't have the install command, you need to replace + # the use of it later in the makefile with a cp and chmod +-INSTALL= /usr/bin/install # common ++#INSTALL= /usr/bin/install # common + #INSTALL= /usr/ucb/install # Pyramid DC/OSx (SVR4) + #INSTALL= /etc/install # Pyramid OSx + #INSTALL= /bin/cp # no install diff --git a/security/tripwire/patches/patch-ab b/security/tripwire/patches/patch-ab index bd6b33c4151..1dbde01090f 100644 --- a/security/tripwire/patches/patch-ab +++ b/security/tripwire/patches/patch-ab @@ -1,6 +1,6 @@ -$NetBSD: patch-ab,v 1.1.1.1 1998/11/17 16:27:25 agc Exp $ +$NetBSD: patch-ab,v 1.2 1999/04/09 10:46:57 agc Exp $ -NetBSD-specific paths for tripwire. +NetBSD and Solaris specific paths for tripwire. --- include/config.h 1994/07/15 11:02:52 1.5 +++ include/config.h 1998/11/17 14:40:02 @@ -9,7 +9,7 @@ NetBSD-specific paths for tripwire. ***/ -#include "../configs/conf-svr4.h" -+#include "../configs/conf-netbsd.h" ++#include "../configs/conf-@LOWER_OPSYS@.h" #ifdef TW_TYPE32 typedef TW_TYPE32 int32; @@ -20,8 +20,8 @@ NetBSD-specific paths for tripwire. - -#define CONFIG_PATH "/tmp/genek" -#define DATABASE_PATH "/tmp/genek" -+# define CONFIG_PATH "@localbase@/etc/tripwire" -+# define DATABASE_PATH "@localbase@/etc/tripwire/databases" ++# define CONFIG_PATH "/usr/local/etc/tripwire" ++# define DATABASE_PATH "/usr/local/etc/tripwire/databases" /******* name of Tripwire files ************************************** * diff --git a/security/tripwire/patches/patch-ac b/security/tripwire/patches/patch-ac index a44ea8eb979..681fb05b43b 100644 --- a/security/tripwire/patches/patch-ac +++ b/security/tripwire/patches/patch-ac @@ -1,4 +1,4 @@ -$NetBSD: patch-ac,v 1.1.1.1 1998/11/17 16:27:25 agc Exp $ +$NetBSD: patch-ac,v 1.2 1999/04/09 10:46:57 agc Exp $ NetBSD defines both LITTLE_ENDIAN and BIG_ENDIAN, and sets the definition of BYTE_ORDER accordingly. So check the value of @@ -6,19 +6,28 @@ BYTE_ORDER in this file. --- sigs/sha/sha.c 1994/07/25 15:46:45 1.5 +++ sigs/sha/sha.c 1998/11/17 15:59:20 -@@ -46,10 +46,7 @@ +@@ -46,10 +46,17 @@ #include "sha.h" -#if BYTEORDER == 0x1234 -#define LITTLE_ENDIAN --#endif -- ++#ifdef __NetBSD__ +#include <machine/endian.h> ++#elif (defined(__sun__) && defined(__svr4__)) ++#define BIG_ENDIAN 4321 ++#define LITTLE_ENDIAN 1234 ++#if defined(__sparc__) ++#define BYTE_ORDER BIG_ENDIAN ++#elif defined(__i386__) ++#define BYTE_ORDER LITTLE_ENDIAN ++#endif + #endif +- /* The SHS f()-functions */ -@@ -214,7 +211,7 @@ +@@ -214,7 +221,7 @@ shsInfo->digest[ 4 ] += E; } @@ -27,7 +36,7 @@ BYTE_ORDER in this file. /* When run on a little-endian CPU we need to perform byte reversal on an array of longwords. It is possible to make the code endianness- -@@ -258,7 +255,7 @@ +@@ -258,7 +265,7 @@ while( count >= SHS_BLOCKSIZE ) { memcpy( (char *) shsInfo->data, (char *) buffer, SHS_BLOCKSIZE ); @@ -36,7 +45,7 @@ BYTE_ORDER in this file. byteReverse( shsInfo->data, SHS_BLOCKSIZE ); #endif /* LITTLE_ENDIAN */ shsTransform( shsInfo ); -@@ -289,7 +286,7 @@ +@@ -289,7 +296,7 @@ { /* Two lots of padding: Pad the first block to 64 bytes */ memset( ( char * ) shsInfo->data + count, 0, 64 - count ); @@ -45,7 +54,7 @@ BYTE_ORDER in this file. byteReverse( shsInfo->data, SHS_BLOCKSIZE ); #endif /* LITTLE_ENDIAN */ shsTransform( shsInfo ); -@@ -300,7 +297,7 @@ +@@ -300,7 +307,7 @@ else /* Pad block to 56 bytes */ memset( ( char * ) shsInfo->data + count, 0, 56 - count ); @@ -54,7 +63,7 @@ BYTE_ORDER in this file. byteReverse( shsInfo->data, SHS_BLOCKSIZE ); #endif /* LITTLE_ENDIAN */ -@@ -309,7 +306,7 @@ +@@ -309,7 +316,7 @@ shsInfo->data[ 15 ] = lowBitcount; shsTransform( shsInfo ); |