From 0db172cd348c0196c55710618cc1f1023e067003 Mon Sep 17 00:00:00 2001 From: agc Date: Fri, 27 Apr 2001 08:40:53 +0000 Subject: 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). --- security/audit-packages/Makefile | 4 ++-- security/audit-packages/files/download-vulnerability-list | 10 ++++++++-- 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} -- cgit v1.2.3