diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2016-10-15 17:20:04 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2016-10-15 17:20:04 +0300 |
commit | 8777a5e616edeae39c93223055a9eafb113d4256 (patch) | |
tree | 6dd0a8262e1ff8e3128151be5ae4c15cd1e5d210 /include/tests_ports_packages | |
parent | f0b9a64c47fa2f84d6b527af7d37afa805c07f63 (diff) |
Use rootdir and proper error redirection
Diffstat (limited to 'include/tests_ports_packages')
-rw-r--r-- | include/tests_ports_packages | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/tests_ports_packages b/include/tests_ports_packages index b3dd652b..5cc9ed06 100644 --- a/include/tests_ports_packages +++ b/include/tests_ports_packages @@ -652,13 +652,13 @@ # 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 ]; then PREQS_MET="YES"; SKIPREASON=""; else PREQS_MET="NO"; SKIPREASON="pkg tool not available"; fi + if [ -x ${ROOTDIR}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 PACKAGE_AUDIT_TOOL_FOUND=1 PACKAGE_AUDIT_TOOL="pkg audit" - FIND=$(/usr/sbin/pkg audit >& /dev/null) + FIND=$(/usr/sbin/pkg audit 2>&1 /dev/null) if [ $? -eq 0 ]; then LogText "Result: pkg audit results are clean" Display --indent 2 --text "- Checking pkg audit to obtain vulnerable packages" --result "${STATUS_NONE}" --color GREEN |