diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2019-05-27 21:02:05 +0800 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2019-05-27 21:02:05 +0800 |
commit | 127e896f232bca5ecf43796989182298d03e277d (patch) | |
tree | a8073c3fca412b2287cb9f0f37e800f2be6d4231 /Mk/Scripts | |
parent | 6be23222ef3195effd87a27dbb687f48e0a62095 (diff) | |
download | freebsd-ports-gnome-127e896f232bca5ecf43796989182298d03e277d.tar.gz freebsd-ports-gnome-127e896f232bca5ecf43796989182298d03e277d.tar.zst freebsd-ports-gnome-127e896f232bca5ecf43796989182298d03e277d.zip |
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
Diffstat (limited to 'Mk/Scripts')
-rw-r--r-- | Mk/Scripts/check-vulnerable.sh | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Mk/Scripts/check-vulnerable.sh b/Mk/Scripts/check-vulnerable.sh index ecac738103dc..bb85a118f559 100644 --- a/Mk/Scripts/check-vulnerable.sh +++ b/Mk/Scripts/check-vulnerable.sh @@ -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." |