diff --git a/security/cgichk/Makefile b/security/cgichk/Makefile index 8e7febb056f..fa9f1d30a3c 100644 --- a/security/cgichk/Makefile +++ b/security/cgichk/Makefile @@ -1,9 +1,4 @@ -# Makefile for: cgichk -# Version required: 3.0 -# Date created: 27 Oct 1999 -# Whom: dugsong@monkey.org -# -# $OpenBSD: Makefile,v 1.11 2002/03/21 21:25:51 espie Exp $ +# $OpenBSD: Makefile,v 1.12 2002/03/24 10:20:24 jsyn Exp $ COMMENT= "scans webservers for vulnerable CGI programs" @@ -15,10 +10,7 @@ EXTRACT_SUFX= .tgz CATEGORIES= security NEED_VERSION= 1.515 -MASTER_SITES= http://web.singnet.com.sg/~cksss/ \ - http://www.securityfocus.com/data/tools/auditing/network/ - -HOMEPAGE= http://web.singnet.com.sg/~cksss/ +MASTER_SITES= ${MASTER_SITE_BACKUP} MAINTAINER= Dug Song @@ -29,7 +21,16 @@ PERMIT_DISTFILES_FTP= Yes WRKDIST= ${WRKDIR}/cgichk3 -post-install: - @strip ${PREFIX}/bin/cgichk +MAKE_FLAGS= CC='${CC}' CFLAGS='${CFLAGS} \ + -DCGICHK_CONF="\"${SYSCONFDIR}/cgichk.conf\""' +MAKE_ENV= SYSCONFDIR="${SYSCONFDIR}" + +NO_REGRESS= Yes + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/cgichk ${PREFIX}/bin + ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/cgichk + ${INSTALL_DATA} ${WRKSRC}/cgi.conf \ + ${PREFIX}/share/examples/cgichk/cgichk.conf .include diff --git a/security/cgichk/patches/patch-aa b/security/cgichk/patches/patch-aa deleted file mode 100644 index 5f1b954bf48..00000000000 --- a/security/cgichk/patches/patch-aa +++ /dev/null @@ -1,18 +0,0 @@ ---- Makefile.orig Tue Sep 12 21:11:17 2000 -+++ Makefile Tue Sep 12 21:27:15 2000 -@@ -1,8 +1,14 @@ -+PREFIX?= /usr/local -+CGICHK_CONF= $(PREFIX)/lib/cgi.conf - - all: cgichk - - cgichk: cgichk3.c -- $(CC) $(CFLAGS) -o $@ cgichk3.c -+ $(CC) $(CFLAGS) -DCGICHK_CONF="\"$(CGICHK_CONF)\"" -o $@ cgichk3.c -+ -+install: -+ install -c -m 755 cgichk $(PREFIX)/bin -+ install -c -m 644 cgi.conf $(CGICHK_CONF) - - clean: - rm -f cgichk *.o *~ diff --git a/security/cgichk/patches/patch-ab b/security/cgichk/patches/patch-cgichk3_c similarity index 96% rename from security/cgichk/patches/patch-ab rename to security/cgichk/patches/patch-cgichk3_c index 2430612d061..c0701debf5a 100644 --- a/security/cgichk/patches/patch-ab +++ b/security/cgichk/patches/patch-cgichk3_c @@ -1,3 +1,4 @@ +$OpenBSD: patch-cgichk3_c,v 1.1 2002/03/24 10:20:24 jsyn Exp $ --- cgichk3.c.orig Tue Sep 12 21:12:21 2000 +++ cgichk3.c Tue Sep 12 21:18:42 2000 @@ -119,20 +119,11 @@ diff --git a/security/cgichk/pkg/DEINSTALL b/security/cgichk/pkg/DEINSTALL new file mode 100644 index 00000000000..363bc5df936 --- /dev/null +++ b/security/cgichk/pkg/DEINSTALL @@ -0,0 +1,25 @@ +#!/bin/sh +# $OpenBSD: DEINSTALL,v 1.1 2002/03/24 10:20:24 jsyn Exp $ +# +# cgichk de-installation + +set -e +PATH=/bin:/usr/bin:/sbin:/usr/sbin +PREFIX=${PKG_PREFIX:-/usr/local} +CONFIG_FILE=${SYSCONFDIR}/cgichk.conf + +if [ -f ${CONFIG_FILE} ]; then + echo + echo "+---------------" + echo "| To completely deinstall the $1 package you need to perform" + echo "| this step as root:" + echo "|" + echo "| rm -f ${CONFIG_FILE}" + echo "|" + echo "| Do not do this if you plan on re-installing $1" + echo "| at some future time." + echo "+---------------" + echo +fi + +exit 0 diff --git a/security/cgichk/pkg/DESCR b/security/cgichk/pkg/DESCR index a5b65923ed4..b413f4ec1ab 100644 --- a/security/cgichk/pkg/DESCR +++ b/security/cgichk/pkg/DESCR @@ -2,5 +2,3 @@ Cgi Scanner 3 is a simple program which facilitates the scanning of hosts on a network for known cgi vulnerabilities. Upon finding a given cgi program, the script will optionally download information from the author's web page, detailing the exploit. - -WWW: ${HOMEPAGE} diff --git a/security/cgichk/pkg/INSTALL b/security/cgichk/pkg/INSTALL new file mode 100644 index 00000000000..633f964db9a --- /dev/null +++ b/security/cgichk/pkg/INSTALL @@ -0,0 +1,65 @@ +#!/bin/sh +# $OpenBSD: INSTALL,v 1.1 2002/03/24 10:20:24 jsyn Exp $ +# +# Pre/post-installation setup of cgichk + +# exit on errors, use a sane path and install prefix +# +set -e +PATH=/bin:/usr/bin:/sbin:/usr/sbin +PREFIX=${PKG_PREFIX:-/usr/local} +CONFIG_FILE=${SYSCONFDIR}/cgichk.conf +SAMPLE_CONFIG_FILE=${PREFIX}/share/examples/cgichk/cgichk.conf + +do_notice() +{ + echo + echo "+---------------" + echo "| The existing $1 configuration file, ${CONFIG_FILE}," + echo "| has NOT been changed. You may want to compare it to the" + echo "| current sample file, ${SAMPLE_CONFIG_FILE}," + echo "| and update your configuration as needed." + echo "+---------------" + echo +} + +do_install() +{ + install -o root -g wheel -m 600 ${SAMPLE_CONFIG_FILE} ${CONFIG_FILE} + echo + echo "+---------------" + echo "| The $1 configuration file, ${CONFIG_FILE}," + echo "| has been installed. Please view this file and change" + echo "| the configuration to meet your needs." + echo "+---------------" + echo + +} + +# verify proper execution +# +if [ $# -ne 2 ]; then + echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2 + exit 1 +fi + +# Verify/process the command +# +case $2 in + PRE-INSTALL) + : nothing to pre-install for this port + ;; + POST-INSTALL) + if [ -f ${CONFIG_FILE} ]; then + do_notice $1 + else + do_install $1 + fi + ;; + *) + echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/security/cgichk/pkg/PLIST b/security/cgichk/pkg/PLIST index 9d4b2e0f27f..33d23e40e2b 100644 --- a/security/cgichk/pkg/PLIST +++ b/security/cgichk/pkg/PLIST @@ -1,3 +1,4 @@ -@comment $OpenBSD: PLIST,v 1.2 2000/09/13 04:49:06 kevlo Exp $ +@comment $OpenBSD: PLIST,v 1.3 2002/03/24 10:20:24 jsyn Exp $ bin/cgichk -lib/cgi.conf +share/examples/cgichk/cgichk.conf +@dirrm share/examples/cgichk