diff options
author | Oliver Eikemeier <eik@FreeBSD.org> | 2004-06-18 07:42:06 +0000 |
---|---|---|
committer | Oliver Eikemeier <eik@FreeBSD.org> | 2004-06-18 07:42:06 +0000 |
commit | 99a5cf7b632398d6db76f0367d8b9dd0335a3b5d (patch) | |
tree | 585a85392bf2a7c29399e0a7ae7d36bae123ed28 /security | |
parent | f705e7297eee0d15ab688486c442a4ab22b9d0b9 (diff) | |
download | ports-99a5cf7b632398d6db76f0367d8b9dd0335a3b5d.tar.gz ports-99a5cf7b632398d6db76f0367d8b9dd0335a3b5d.zip |
Notes
Diffstat (limited to 'security')
-rw-r--r-- | security/portaudit-db/Makefile | 2 | ||||
-rw-r--r-- | security/portaudit-db/files/packaudit.sh | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/security/portaudit-db/Makefile b/security/portaudit-db/Makefile index 2451ac2d2e2f..4d264698f890 100644 --- a/security/portaudit-db/Makefile +++ b/security/portaudit-db/Makefile @@ -6,7 +6,7 @@ # PORTNAME= portaudit-db -PORTVERSION= 0.2 +PORTVERSION= 0.2.1 CATEGORIES= security DISTFILES= diff --git a/security/portaudit-db/files/packaudit.sh b/security/portaudit-db/files/packaudit.sh index 5695124e5f6b..6b04da904186 100644 --- a/security/portaudit-db/files/packaudit.sh +++ b/security/portaudit-db/files/packaudit.sh @@ -37,6 +37,7 @@ CAT=/bin/cat DATE=/bin/date ENV=/usr/bin/env MD5=/sbin/md5 +MKDIR="/bin/mkdir -p" MKTEMP=/usr/bin/mktemp RM=/bin/rm SED=/usr/bin/sed @@ -53,10 +54,17 @@ STYLESHEET="%%DATADIR%%/vuxml2portaudit.xslt" PUBLIC_HTML="${PUBLIC_HTML:-$HOME/public_html/portaudit}" HTMLSHEET="%%DATADIR%%/vuxml2html.xslt" -BASEURL="http://people.freebsd.org/~eik/portaudit/" +BASEURL="${BASEURL:-http://people.freebsd.org/~eik/portaudit/}" PORTAUDIT2VUXML="%%DATADIR%%/portaudit2vuxml.awk" +[ -d "$DATABASEDIR" ] || $MKDIR "$DATABASEDIR" + +if [ ! -w "$DATABASEDIR" ]; then + echo "$DATABASEDIR is not writable by you, exiting." + exit 1 +fi + TMPNAME=`$BASENAME "$0"` VULVER=`$SED -En -e '/^.*\\$FreeBSD\: [^$ ]+,v ([0-9]+(\.[0-9]+)+) [^$]+\\$.*$/{s//\1/p;q;}' "$VUXMLDIR/vuln.xml"` @@ -64,7 +72,7 @@ VULURL="http://cvsweb.freebsd.org/ports/security/vuxml/vuln.xml?rev=$VULVER" [ -r "%%PREFIX%%/etc/packaudit.conf" ] && . "%%PREFIX%%/etc/packaudit.conf" -if [ -d "$PUBLIC_HTML" ]; then +if [ -d "$PUBLIC_HTML" -a -w "$PUBLIC_HTML" ]; then VULNMD5=`$CAT "$VUXMLDIR/vuln.xml" "$PORTAUDITDBDIR/database/portaudit.xml" "$PORTAUDITDBDIR/database/portaudit.txt" | $MD5` if [ -f "$PUBLIC_HTML/portaudit.md5" ]; then VULNMD5_OLD=`$CAT "$PUBLIC_HTML/portaudit.md5"` |