- all real distsites have long since gone away; use

MASTER_SITE_BACKUP explicitly instead
- remove HOMEPAGE references
- handle configuration file the right way
- do installation a better way
- rename/mod patch; add $OpenBSD$
- NO_REGRESS
This commit is contained in:
jsyn 2002-03-24 10:20:24 +00:00
parent c12e61ab46
commit 2ff40b3de8
7 changed files with 107 additions and 34 deletions

View File

@ -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 <dugsong@monkey.org>
@ -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 <bsd.port.mk>

View File

@ -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 *~

View File

@ -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 @@

View File

@ -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

View File

@ -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}

View File

@ -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

View File

@ -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