summaryrefslogtreecommitdiff
path: root/security/audit-packages
diff options
context:
space:
mode:
authoragc <agc>2001-04-27 08:40:53 +0000
committeragc <agc>2001-04-27 08:40:53 +0000
commita9e3b3308274cbdf209d2756ec71253ada535394 (patch)
treea5fdcbce44ec9040a84bbcfba9bc63afee952c89 /security/audit-packages
parentc94b5b568911c7a1adaac9172a41dc69a9989b9c (diff)
downloadpkgsrc-a9e3b3308274cbdf209d2756ec71253ada535394.tar.gz
Update audit-packages to 1.8:
Fix a problem which occurs if the vulnerability list does not already exist. This fixes PR 12763 from Brian de Alwis (bsd@cs.ubc.ca), albeit in a slightly different manner. (I also added a check for the existence of the new vulnerabilities file, in case it was not downloaded for some reason).
Diffstat (limited to 'security/audit-packages')
-rw-r--r--security/audit-packages/Makefile4
-rw-r--r--security/audit-packages/files/download-vulnerability-list10
2 files changed, 10 insertions, 4 deletions
diff --git a/security/audit-packages/Makefile b/security/audit-packages/Makefile
index 238d6cdc100..c704dd770d1 100644
--- a/security/audit-packages/Makefile
+++ b/security/audit-packages/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.9 2001/04/24 09:32:13 agc Exp $
+# $NetBSD: Makefile,v 1.10 2001/04/27 08:40:53 agc Exp $
-DISTNAME= audit-packages-1.7
+DISTNAME= audit-packages-1.8
CATEGORIES= security pkgtools
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/security/audit-packages/files/download-vulnerability-list b/security/audit-packages/files/download-vulnerability-list
index c9afb3c9a96..e2513e6af43 100644
--- a/security/audit-packages/files/download-vulnerability-list
+++ b/security/audit-packages/files/download-vulnerability-list
@@ -10,8 +10,14 @@ NEW_VUL_LIST=${DISTDIR}/vulnerabilities.$$
EXIST_VUL_LIST=${DISTDIR}/vulnerabilities
${FETCH_CMD} -o ${NEW_VUL_LIST} ${VUL_SOURCE}
-existsize=`/bin/ls -l ${EXIST_VUL_LIST} | ${AWK} '{ print $5 }'`
-newsize=`/bin/ls -l ${NEW_VUL_LIST} | ${AWK} '{ print $5 }'`
+existsize=0
+newsize=0
+if [ -f ${EXIST_VUL_LIST} ]; then
+ existsize=`/bin/ls -l ${EXIST_VUL_LIST} | ${AWK} '{ print $5 }'`
+fi
+if [ -f ${NEW_VUL_LIST} ]; then
+ newsize=`/bin/ls -l ${NEW_VUL_LIST} | ${AWK} '{ print $5 }'`
+fi
if [ $newsize -lt $existsize ]; then
echo "New vulnerability list ($$newsize bytes) is smaller than existing list ($$existsize bytes)" 1>&2
/bin/rm -f ${NEW_VUL_LIST}