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
This commit is contained in:
parent
6be23222ef
commit
127e896f23
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=502793
1 changed files with 1 additions and 3 deletions
|
@ -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."
|
||||
|
|
Loading…
Reference in a new issue