mirror of https://github.com/CISOfy/lynis.git
[PKGS-7381] bugfix at detection of pkg tool
This commit is contained in:
parent
d88f755f40
commit
f0b9a64c47
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue