[PKGS-7381] Enhanced FreeBSD pkg audit testing

This commit is contained in:
Michael Boelen 2017-03-09 12:27:38 +01:00
parent e082b8af08
commit 336dcb4811
1 changed files with 6 additions and 1 deletions

View File

@ -659,7 +659,12 @@
PACKAGE_AUDIT_TOOL_FOUND=1
PACKAGE_AUDIT_TOOL="pkg audit"
if [ -f ${ROOTDIR}var/db/pkg/vuln.xml ]; then
FIND=$(${PKG_BINARY} audit 2> /dev/null)
# Query pkg audit, with optional refresh of vulnerability data (-F)
if [ ${REFRESH_REPOSITORIES} -eq 1 ]; then
FIND=$(${PKG_BINARY} audit -F -q 2> /dev/null)
else
FIND=$(${PKG_BINARY} audit -q 2> /dev/null)
fi
if [ $? -eq 0 ]; then
LogText "Result: pkg audit results are clean"
Display --indent 2 --text "- Checking pkg audit to obtain vulnerable packages" --result "${STATUS_NONE}" --color GREEN