Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Boelen <michael.boelen@cisofy.com>2016-10-15 17:16:26 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2016-10-15 17:16:26 +0300
commitf0b9a64c47fa2f84d6b527af7d37afa805c07f63 (patch)
treeff2bb781bc1c12fa7edcdc82d4f9242da285e4ff
parentd88f755f40f6fd39afc78ec947695a10ccafc111 (diff)
[PKGS-7381] bugfix at detection of pkg tool
-rw-r--r--include/tests_ports_packages4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/tests_ports_packages b/include/tests_ports_packages
index a6927046..b3dd652b 100644
--- a/include/tests_ports_packages
+++ b/include/tests_ports_packages
@@ -652,7 +652,7 @@
# Description : Check for vulnerable FreeBSD packages (with pkg)
# Notes : Related vulnerability file is /var/db/pkg/vuln.xml
# TODO : Run this in any jail
- if [ -x /usr/sbin/pkg -a ]; then PREQS_MET="YES"; SKIPREASON=""; else PREQS_MET="NO"; SKIPREASON="pkg tool not available"; fi
+ if [ -x /usr/sbin/pkg ]; then PREQS_MET="YES"; SKIPREASON=""; else PREQS_MET="NO"; SKIPREASON="pkg tool not available"; fi
Register --test-no PKGS-7381 --preqs-met ${PREQS_MET} --skip-reason "${SKIPREASON}" --weight L --network NO --category security --description "Check for vulnerable FreeBSD packages with pkg"
if [ ${SKIPTEST} -eq 0 ]; then
COUNT=0
@@ -678,8 +678,10 @@
LogText "Result: found an exit code greater than zero, yet no output"
fi
elif [ $? -eq 65 ]; then
+ LogText "Result: exited with code 65, meaning there is no vulnerability database"
ReportWarning "${TEST_NO}" "No vulnerability database available" "pkg audit" "text:Run pkg audit -f"
else
+ LogText "Result: exited with code $?"
ReportException "${TEST_NO}" "Found an unknown exit code for pkg audit. Please create an issue at ${PROJECT_SOURCE}"
fi
fi