summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>2001-04-27 08:40:53 +0000
committeragc <agc@pkgsrc.org>2001-04-27 08:40:53 +0000
commit0db172cd348c0196c55710618cc1f1023e067003 (patch)
treea5fdcbce44ec9040a84bbcfba9bc63afee952c89
parent0a732ad5afb3a1412fe74698d2682e18602abf64 (diff)
downloadpkgsrc-0db172cd348c0196c55710618cc1f1023e067003.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).
-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}