diff options
author | mboelen <michael@cisofy.com> | 2014-09-04 22:38:21 +0400 |
---|---|---|
committer | mboelen <michael@cisofy.com> | 2014-09-04 22:38:21 +0400 |
commit | b121be4317d87432e7b2dbc64eeaeadae3231f14 (patch) | |
tree | d48518efdde6aeb9bbc960f0a38a514920dfffea /include | |
parent | d43cdae34f4887a5d07160e86e76fa14f1939670 (diff) |
Improved vulnerable packages test when using apt-check
Diffstat (limited to 'include')
-rw-r--r-- | include/tests_ports_packages | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/tests_ports_packages b/include/tests_ports_packages index 96ff5eb7..958cf7bb 100644 --- a/include/tests_ports_packages +++ b/include/tests_ports_packages @@ -678,11 +678,13 @@ PKG_AUDIT_TOOL="apt-check" logtext "Result: found /usr/lib/update-notifier/apt-check" logtext "Action: checking if any of the updates contain security updates" - FIND=`/usr/lib/update-notifier/apt-check --human-readable | grep "are security updates" | awk -F" " '{ print $1 }'` + # apt-check binary is a script and translated. Do not search for normal text strings, but use numbered output only + FIND=`/usr/lib/update-notifier/apt-check 2>&1 | awk -F\; '{ print $2 }'` # Check if we get the proper line back and amount of security patches available if [ "${FIND}" = "" ]; then logtext "Result: did not find security updates line" - ReportSuggestion ${TEST_NO} "Check if system is up-to-date, security updates test gives an unexpected result" + ReportSuggestion ${TEST_NO} "Check if system is up-to-date, security updates test (apt-check) gives an unexpected result" + ReportException "${TEST_NO}:1" "Apt-check did not provide any result" else if [ "${FIND}" = "0" ]; then logtext "Result: no vulnerable packages found via apt-check" |