diff --git a/security/cvechecker/Makefile b/security/cvechecker/Makefile index ea4f779c8639..3d65f2efad55 100644 --- a/security/cvechecker/Makefile +++ b/security/cvechecker/Makefile @@ -3,8 +3,7 @@ PORTNAME= cvechecker DISTVERSIONPREFIX= v -DISTVERSION= 3.8 -PORTREVISION= 2 +DISTVERSION= 3.9 CATEGORIES= security MAINTAINER= se@FreeBSD.org diff --git a/security/cvechecker/distinfo b/security/cvechecker/distinfo index 715c736bc51b..fd817a4798b3 100644 --- a/security/cvechecker/distinfo +++ b/security/cvechecker/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1507830626 -SHA256 (sjvermeu-cvechecker-v3.8_GH0.tar.gz) = 53a2f0edab34ea75d3d33b8c840f27c60464f0433c2b82bc8b02298306c53268 -SIZE (sjvermeu-cvechecker-v3.8_GH0.tar.gz) = 3329220 +TIMESTAMP = 1536581491 +SHA256 (sjvermeu-cvechecker-v3.9_GH0.tar.gz) = a8c05be9e81533bd1b9441fe1a38e54d2939123af7c5d933bac28cb51d41dc27 +SIZE (sjvermeu-cvechecker-v3.9_GH0.tar.gz) = 3329468 diff --git a/security/cvechecker/files/patch-scripts_pullcves b/security/cvechecker/files/patch-scripts_pullcves index 5d867092766d..c621d84d0b61 100644 --- a/security/cvechecker/files/patch-scripts_pullcves +++ b/security/cvechecker/files/patch-scripts_pullcves @@ -1,4 +1,4 @@ ---- scripts/pullcves.orig 2017-03-27 16:42:38 UTC +--- scripts/pullcves.orig 2018-09-09 10:32:47 UTC +++ scripts/pullcves @@ -44,17 +44,11 @@ then exit 1; @@ -19,7 +19,7 @@ DLCVE=0; DLDAT=0; COMMAND=$1; -@@ -68,7 +69,7 @@ do +@@ -68,7 +62,7 @@ do if [ ! -f ${CVECACHE}/nvdcve-2.0-20${YEAR}.xml ]; then printf "Downloading nvdcve-2.0-20${YEAR}.xml... "; @@ -28,7 +28,7 @@ gunzip -c ${CVECACHE}/nvdcve-2.0-20${YEAR}.xml.gz > ${CVECACHE}/nvdcve-2.0-20${YEAR}.xml && rm ${CVECACHE}/nvdcve-2.0-20${YEAR}.xml.gz; printf "ok\nConverting nvdcve-2.0-20${YEAR}.xml to CSV... "; xsltproc ${DATADIR}/nvdcve2simple.xsl ${CVECACHE}/nvdcve-2.0-20${YEAR}.xml > ${CVECACHE}/nvdcve-2.0-20${YEAR}.csv; -@@ -85,7 +86,7 @@ else +@@ -85,7 +79,7 @@ else CKSUM=$(cksum nvdcve-2.0-Modified.xml 2>/dev/null); fi printf "Downloading nvdcve-2.0-Modified.xml... "; @@ -37,7 +37,7 @@ gunzip -c nvdcve-2.0-Modified.xml.gz > nvdcve-2.0-Modified.xml && rm nvdcve-2.0-Modified.xml.gz; CKSUM2=$(cksum nvdcve-2.0-Modified.xml 2>/dev/null); if [ "${CKSUM2}" != "${CKSUM}" ] || [ -f nvdcve-2.0-Modified.xml.1 ]; -@@ -113,7 +114,7 @@ fi +@@ -113,7 +107,7 @@ fi CKSUM=$(cksum versions.dat 2>/dev/null); printf "Downloading versions.dat... "; diff --git a/security/cvechecker/files/patch-src_cvecheck.c b/security/cvechecker/files/patch-src_cvecheck.c deleted file mode 100644 index 217e2f9ef978..000000000000 --- a/security/cvechecker/files/patch-src_cvecheck.c +++ /dev/null @@ -1,49 +0,0 @@ ---- src/cvecheck.c.orig 2017-03-27 16:42:38 UTC -+++ src/cvecheck.c -@@ -1170,15 +1170,11 @@ int load_watch_list(struct workstate * ws) { - rc = delete_cpe(line, ws); - if (rc) { - fprintf(stderr, " ! An error occurred while interpreting CPE on line %d\n", linenum-1); -- zero_string(line, CPELINESIZE); -- continue; - }; - } else { - rc = add_cpe(line, ws); - if (rc) { - fprintf(stderr, " ! An error occurred while interpreting CPE on line %d\n", linenum-1); -- zero_string(line, CPELINESIZE); -- continue; - }; - }; - zero_string(line, CPELINESIZE); -@@ -1366,9 +1362,9 @@ int load_cve(struct workstate * ws) { - fieldCounter = 0; - - // Split based on ':' character -+ int invalid_line = 0; - while (sscanf(bufferptr, "%[^:]s", field) == 1) { - int fieldLength = swstrlen(field); // Capture field length up front as strtok_r modifies the string -- - if (fieldCounter == 0) { - // Should be "CVE-####-####+" (CVE identifier) - char * sCVE; -@@ -1431,7 +1427,8 @@ int load_cve(struct workstate * ws) { - (strncmp(field, "/o", 2) != 0) && - (strncmp(field, "/h", 2) != 0) ) { - fprintf(stderr, " ! Error while reading in CVE entries: CPE type in line %d is not one of a/o/h\n", linenum); -- return 1; -+ invalid_line = 1; -+ break; - } - snprintf(tmpCpeId, 3, "%s", field); - -@@ -1463,7 +1460,8 @@ int load_cve(struct workstate * ws) { - bufferptr = bufferptr + fieldLength + 1; - ++fieldCounter; - } -- -+ if (invalid_line) -+ continue; - // Build the CPE up - snprintf(cpeId, CPELINESIZE, "cpe:%s:%s:%s:%s:%s:%s:%s", tmpCpeId, tmpCpeVendor, tmpCpeProduct, tmpCpeVersion, tmpCpeUpdate, tmpCpeEdition, tmpCpeLanguage); - diff --git a/security/cvechecker/pkg-deinstall b/security/cvechecker/pkg-deinstall index 030fa9b88d3c..0d1e7d2dba0e 100644 --- a/security/cvechecker/pkg-deinstall +++ b/security/cvechecker/pkg-deinstall @@ -1,12 +1,14 @@ #!/bin/sh +PORTNAME=${1%-*} + [ "$2" = DEINSTALL ] && cat <<***EOM ------------------------------------------------------------------------------ -If you are no longer using the $1 port, then manually delete -the following directory: +If you are no longer using the $PORTNAME port, then manually delete +the following directory and all its contents: - /var/db/cvechecker + /var/db/$PORTNAME ------------------------------------------------------------------------------ ***EOM