Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 May 2019 13:02:05 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r502793 - head/Mk/Scripts
Message-ID:  <201905271302.x4RD254R057151@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Mon May 27 13:02:05 2019
New Revision: 502793
URL: https://svnweb.freebsd.org/changeset/ports/502793

Log:
  Improve vulnerability checking
  
  Use the return value of the pkg audit command instead of parsing its output
  The output will change in the next version of pkg
  
  Approved by:	mat (portmgr)
  Reviewed by:	mat (portmgr)
  Differential Revision:	https://reviews.freebsd.org/D20376

Modified:
  head/Mk/Scripts/check-vulnerable.sh

Modified: head/Mk/Scripts/check-vulnerable.sh
==============================================================================
--- head/Mk/Scripts/check-vulnerable.sh	Mon May 27 12:58:08 2019	(r502792)
+++ head/Mk/Scripts/check-vulnerable.sh	Mon May 27 13:02:05 2019	(r502793)
@@ -24,9 +24,7 @@ if [ ! -x "${dp_PKG_BIN}" ]; then
 	exit 0
 fi
 
-vlist=$(${dp_PKG_BIN} audit "${dp_PKGNAME}" || :)
-
-if [ "${vlist}" != "0 problem(s) in the installed packages found." ]; then
+if ! vlist=$(${dp_PKG_BIN} audit "${dp_PKGNAME}"); then
 	${dp_ECHO_MSG} "===>  ${dp_PKGNAME} has known vulnerabilities:"
 	${dp_ECHO_MSG} "$vlist"
 	${dp_ECHO_MSG} "=> Please update your ports tree and try again."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905271302.x4RD254R057151>