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:
Diffstat (limited to 'include/tests_ports_packages')
-rw-r--r--include/tests_ports_packages122
1 files changed, 61 insertions, 61 deletions
diff --git a/include/tests_ports_packages b/include/tests_ports_packages
index 9981faf9..f104ec53 100644
--- a/include/tests_ports_packages
+++ b/include/tests_ports_packages
@@ -42,7 +42,7 @@
if [ ${SKIPTEST} -eq 0 ]; then
FIND=`pkg -N 2>&1; echo $?`
if [ "${FIND}" = "0" ]; then
- Display --indent 4 --text "- Searching packages with pkg" --result FOUND --color GREEN
+ Display --indent 4 --text "- Searching packages with pkg" --result "${STATUS_FOUND}" --color GREEN
Report "package_manager[]=pkg"
PACKAGE_MGR_PKG=1
LogText "Result: Found pkg"
@@ -67,7 +67,7 @@
Register --test-no PKGS-7302 --preqs-met ${PREQS_MET} --weight L --network NO --description "Query FreeBSD/NetBSD pkg_info"
if [ ${SKIPTEST} -eq 0 ]; then
N=0
- Display --indent 4 --text "- Checking pkg_info" --result FOUND --color GREEN
+ Display --indent 4 --text "- Checking pkg_info" --result "${STATUS_FOUND}" --color GREEN
LogText "Result: Found pkg_info"
Report "package_manager[]=pkg_info"
LogText "Test: Querying pkg_info to get package list"
@@ -93,7 +93,7 @@
if [ ! "${FIND}" = "" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
Register --test-no PKGS-7303 --preqs-met ${PREQS_MET} --weight L --network NO --description "Query brew package manager"
if [ ${SKIPTEST} -eq 0 ]; then
- Display --indent 4 --text "- Searching brew" --result FOUND --color GREEN
+ Display --indent 4 --text "- Searching brew" --result "${STATUS_FOUND}" --color GREEN
LogText "Result: Found brew"
Report "package_manager[]=brew"
LogText "Test: Querying brew to get package list"
@@ -115,7 +115,7 @@
if [ -x /usr/bin/emerge -a -x /usr/bin/equery ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
Register --test-no PKGS-7304 --preqs-met ${PREQS_MET} --weight L --network NO --description "Querying Gentoo packages"
if [ ${SKIPTEST} -eq 0 ]; then
- Display --indent 4 --text "- Searching emerge" --result FOUND --color GREEN
+ Display --indent 4 --text "- Searching emerge" --result "${STATUS_FOUND}" --color GREEN
LogText "Result: Found Gentoo emerge"
Report "package_manager[]=emerge"
LogText "Test: Querying portage to get package list"
@@ -138,7 +138,7 @@
if [ -x /usr/bin/pkginfo ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
Register --test-no PKGS-7306 --os Solaris --preqs-met ${PREQS_MET} --weight L --network NO --description "Querying Solaris packages"
if [ ${SKIPTEST} -eq 0 ]; then
- Display --indent 4 --text "- Searching pkginfo" --result FOUND --color GREEN
+ Display --indent 4 --text "- Searching pkginfo" --result "${STATUS_FOUND}" --color GREEN
LogText "Result: Found Solaris pkginfo"
Report "package_manager[]=pkginfo"
LogText "Test: Querying pkginfo to get package list"
@@ -162,7 +162,7 @@
Register --test-no PKGS-7308 --preqs-met ${PREQS_MET} --weight L --network NO --description "Checking package list with RPM"
if [ ${SKIPTEST} -eq 0 ]; then
N=0
- Display --indent 4 --text "- Searching RPM package manager" --result FOUND --color GREEN
+ Display --indent 4 --text "- Searching RPM package manager" --result "${STATUS_FOUND}" --color GREEN
LogText "Result: Found rpm binary (${RPMBINARY})"
Report "package_manager[]=rpm"
LogText "Test: Querying 'rpm -qa' to get package list"
@@ -195,7 +195,7 @@
Register --test-no PKGS-7310 --preqs-met ${PREQS_MET} --weight L --network NO --description "Checking package list with pacman"
if [ ${SKIPTEST} -eq 0 ]; then
N=0
- Display --indent 4 --text "- Searching pacman package manager" --result FOUND --color GREEN
+ Display --indent 4 --text "- Searching pacman package manager" --result "${STATUS_FOUND}" --color GREEN
LogText "Result: Found pacman binary (${PACMANBINARY})"
Report "package_manager[]=pacman"
LogText "Test: Querying 'pacman -Q' to get package list"
@@ -309,9 +309,9 @@
FIND=`${ZYPPERBINARY} -n pchk | grep "(0 security patches)"`
if [ ! "${FIND}" = "" ]; then
LogText "Result: No security updates found with Zypper"
- Display --indent 2 --text "- Using Zypper to find vulnerable packages" --result NONE --color GREEN
+ Display --indent 2 --text "- Using Zypper to find vulnerable packages" --result "${STATUS_NONE}" --color GREEN
else
- Display --indent 2 --text "- Using Zypper to find vulnerable packages" --result WARNING --color RED
+ Display --indent 2 --text "- Using Zypper to find vulnerable packages" --result "${STATUS_WARNING}" --color RED
LogText "Result: Zypper found one or more installed packages which are vulnerable."
ReportWarning ${TEST_NO} "H" "Found one or more vulnerable packages installed"
# Unfortunately zypper does not properly give back which package it is. Usually best guess is last word on the line
@@ -335,7 +335,7 @@
Register --test-no PKGS-7345 --preqs-met ${PREQS_MET} --weight L --network NO --description "Querying dpkg"
if [ ${SKIPTEST} -eq 0 ]; then
N=0
- Display --indent 4 --text "- Searching dpkg package manager" --result FOUND --color GREEN
+ Display --indent 4 --text "- Searching dpkg package manager" --result "${STATUS_FOUND}" --color GREEN
LogText "Result: Found dpkg binary"
Report "package_manager[]=dpkg"
LogText "Test: Querying dpkg -l to get package list"
@@ -366,10 +366,10 @@
LogText "Test: Querying dpkg -l to get unpurged packages"
SPACKAGES=`dpkg -l 2>/dev/null | grep "^rc" | cut -d ' ' -f3 | sort`
if [ "${SPACKAGES}" = "" ]; then
- Display --indent 4 --text "- Query unpurged packages" --result NONE --color GREEN
+ Display --indent 4 --text "- Query unpurged packages" --result "${STATUS_NONE}" --color GREEN
LogText "Result: no packages found with left overs"
else
- Display --indent 4 --text "- Query unpurged packages" --result FOUND --color YELLOW
+ Display --indent 4 --text "- Query unpurged packages" --result "${STATUS_FOUND}" --color YELLOW
LogText "Result: found one or more packages with left over configuration files, cron jobs etc"
LogText "Output:"
for J in ${SPACKAGES}; do
@@ -394,10 +394,10 @@
if [ -x /usr/local/sbin/portsclean ]; then
FIND=`/usr/local/sbin/portsclean -n -DD | grep 'Delete' | wc -l | tr -d ' '`
if [ ${FIND} -eq 0 ]; then
- Display --indent 2 --text "- Checking presence old distfiles" --result OK --color GREEN
+ Display --indent 2 --text "- Checking presence old distfiles" --result "${STATUS_OK}" --color GREEN
LogText "Result: no unused distfiles found"
else
- Display --indent 2 --text "- Checking presence old distfiles" --result WARNING --color YELLOW
+ Display --indent 2 --text "- Checking presence old distfiles" --result "${STATUS_WARNING}" --color YELLOW
LogText "Result: found ${FIND} unused distfiles"
ReportSuggestion ${TEST_NO} "Unused distfiles found. Use portsclean to delete these files. For example: portsclean -DD."
fi
@@ -412,7 +412,7 @@
if [ ! "${DNFBINARY}" = "" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
Register --test-no "PKGS-7350" --preqs-met ${PREQS_MET} --weight L --network NO --description "Checking for installed packages with DNF utility"
if [ ${SKIPTEST} -eq 0 ]; then
- Display --indent 4 --text "- Searching DNF package manager" --result FOUND --color GREEN
+ Display --indent 4 --text "- Searching DNF package manager" --result "${STATUS_FOUND}" --color GREEN
LogText "Result: found DNF (Dandified YUM) utility (binary: ${DNFBINARY})"
Report "package_manager[]=dnf"
Display --indent 6 --text "- Querying DNF package manager"
@@ -448,11 +448,11 @@
AddHP 1 2
done
ReportWarning ${TEST_NO} "H" "Found one or more vulnerable packages. Run: dnf upgrade"
- Display --indent 2 --text "- Using DNF to find vulnerable packages" --result WARNING --color RED
+ Display --indent 2 --text "- Using DNF to find vulnerable packages" --result "${STATUS_WARNING}" --color RED
else
LogText "Result: no security updates found"
- Display --indent 2 --text "- Using DNF to find vulnerable packages" --result NONE --color GREEN
+ Display --indent 2 --text "- Using DNF to find vulnerable packages" --result "${STATUS_NONE}" --color GREEN
AddHP 5 5
fi
fi
@@ -490,24 +490,24 @@
if [ ${SKIPTEST} -eq 0 ]; then
if [ ! "${DEBSECANBINARY}" = "" ]; then
LogText "Result: debsecan utility is installed"
- Display --indent 4 --text "- debsecan utility" --result "FOUND" --color GREEN
+ Display --indent 4 --text "- debsecan utility" --result "${STATUS_FOUND}" --color GREEN
AddHP 3 3
PACKAGE_AUDIT_TOOL_FOUND=1
PACKAGE_AUDIT_TOOL="debsecan"
FIND=`find /etc/cron* -name debsecan`
if [ ! ${FIND} = "" ]; then
LogText "Result: cron job is configured for debsecan"
- Display --indent 6 --text "- debsecan cron job" --result "FOUND" --color GREEN
+ Display --indent 6 --text "- debsecan cron job" --result "${STATUS_FOUND}" --color GREEN
AddHP 3 3
else
LogText "Result: no cron job is configured for debsecan"
- Display --indent 4 --text "- debsecan cron job" --result "NOT FOUND" --color YELLOW
+ Display --indent 4 --text "- debsecan cron job" --result "${STATUS_NOT_FOUND}" --color YELLOW
AddHP 1 3
ReportSuggestion ${TEST_NO} "Check debsecan cron job and ensure it is enabled"
fi
else
LogText "Result: debsecan is not installed."
- Display --indent 4 --text "- debsecan utility" --result "NOT FOUND" --color YELLOW
+ Display --indent 4 --text "- debsecan utility" --result "${STATUS_NOT_FOUND}" --color YELLOW
AddHP 0 2
ReportSuggestion ${TEST_NO} "Install debsecan to check for vulnerabilities on installed packages."
fi
@@ -523,17 +523,17 @@
if [ ${SKIPTEST} -eq 0 ]; then
if [ ! "${DEBSUMSBINARY}" = "" ]; then
LogText "Result: debsums utility is installed"
- Display --indent 4 --text "- debsums utility" --result "FOUND" --color GREEN
+ Display --indent 4 --text "- debsums utility" --result "${STATUS_FOUND}" --color GREEN
AddHP 1 1
# Check in /etc/cron.hourly, daily, weekly, monthly etc
COUNT=`find /etc/cron* -name debsums | wc -l`
if [ ${COUNT} -gt 0 ]; then
LogText "Result: Cron job is configured for debsums utility."
- Display --indent 6 --text "- Cron job for debsums" --result "FOUND" --color GREEN
+ Display --indent 6 --text "- Cron job for debsums" --result "${STATUS_FOUND}" --color GREEN
AddHP 3 3
else
LogText "Result: Cron job is not configured for debsums utility."
- Display --indent 6 --text "- Cron job for debsums" --result "NOT FOUND" --color YELLOW
+ Display --indent 6 --text "- Cron job for debsums" --result "${STATUS_NOT_FOUND}" --color YELLOW
AddHP 1 3
ReportSuggestion "${TEST_NO}" "Check debsums configuration and enable checking regurlarly via a cron job."
fi
@@ -562,9 +562,9 @@
Report "upgrade_available_count=${N}"
if [ ${N} -eq 0 ]; then
LogText "Result: no upgrades found"
- Display --indent 2 --text "- Checking portmaster for updates" --result NONE --color GREEN
+ Display --indent 2 --text "- Checking portmaster for updates" --result "${STATUS_NONE}" --color GREEN
else
- Display --indent 2 --text "- Checking portmaster for updates" --result FOUND --color YELLOW
+ Display --indent 2 --text "- Checking portmaster for updates" --result "${STATUS_FOUND}" --color YELLOW
fi
fi
#
@@ -581,10 +581,10 @@
FIND=`/usr/sbin/pkg_admin audit`
if [ "${FIND}" = "" ]; then
LogText "Result: pkg audit results are clean"
- Display --indent 2 --text "- Checking pkg_admin audit to obtain vulnerable packages" --result NONE --color GREEN
+ Display --indent 2 --text "- Checking pkg_admin audit to obtain vulnerable packages" --result "${STATUS_NONE}" --color GREEN
AddHP 2 2
else
- Display --indent 2 --text "- Checking pkg_admin audit to obtain vulnerable packages" --result WARNING --color RED
+ Display --indent 2 --text "- Checking pkg_admin audit to obtain vulnerable packages" --result "${STATUS_WARNING}" --color RED
LogText "Result: pkg_admin audit found one or more installed packages which are vulnerable."
ReportWarning ${TEST_NO} "M" "Found one or more vulnerable packages."
LogText "List of vulnerable packages/version:"
@@ -602,7 +602,7 @@
fi
else
- Display --indent 2 --text "- pkg_admin audit not installed" --result "NOT FOUND" --color WHITE
+ Display --indent 2 --text "- pkg_admin audit not installed" --result "${STATUS_NOT_FOUND}" --color WHITE
LogText "Result: pkg_admin audit not installed, skipping this vulnerability test."
fi
fi
@@ -620,13 +620,13 @@
PACKAGE_AUDIT_TOOL="pkg audit"
if [ "${FIND}" = "" ]; then
LogText "Result: pkg audit results are clean"
- Display --indent 2 --text "- Checking pkg audit to obtain vulnerable packages" --result NONE --color GREEN
+ Display --indent 2 --text "- Checking pkg audit to obtain vulnerable packages" --result "${STATUS_NONE}" --color GREEN
else
LogText "Result: ${FIND}"
VULNERABLE_PACKAGES_FOUND=1
- Display --indent 2 --text "- Checking pkg audit to obtain vulnerable packages" --result FOUND --color YELLOW
+ Display --indent 2 --text "- Checking pkg audit to obtain vulnerable packages" --result "${STATUS_FOUND}" --color YELLOW
ReportSuggestion ${TEST_NO} "Check output of pkg audit"
- #Display --indent 2 --text "- Checking pkg audit to obtain vulnerable packages" --result WARNING --color RED
+ #Display --indent 2 --text "- Checking pkg audit to obtain vulnerable packages" --result "${STATUS_WARNING}" --color RED
#LogText "Result: pkg audit found one or more installed packages which are vulnerable."
#ReportWarning ${TEST_NO} "M" "Found one or more vulnerable packages."
#ReportSuggestion ${TEST_NO} "Update your system with portupgrade or other tools"
@@ -639,7 +639,7 @@
#done
fi
else
- Display --indent 2 --text "- pkg audit not installed" --result "NOT FOUND" --color WHITE
+ Display --indent 2 --text "- pkg audit not installed" --result "${STATUS_NOT_FOUND}" --color WHITE
LogText "Result: pkg audit not installed, skipping this vulnerability test."
fi
fi
@@ -656,9 +656,9 @@
FIND=`/usr/local/sbin/portaudit | grep 'problem(s) in your installed packages found' | grep -v '0 problem(s) in your installed packages found'`
if [ "${FIND}" = "" ]; then
LogText "Result: Portaudit results are clean"
- Display --indent 2 --text "- Checking portaudit to obtain vulnerable packages" --result NONE --color GREEN
+ Display --indent 2 --text "- Checking portaudit to obtain vulnerable packages" --result "${STATUS_NONE}" --color GREEN
else
- Display --indent 2 --text "- Checking portaudit to obtain vulnerabilities" --result WARNING --color RED
+ Display --indent 2 --text "- Checking portaudit to obtain vulnerabilities" --result "${STATUS_WARNING}" --color RED
LogText "Result: Portaudit found one or more installed packages which are vulnerable."
ReportWarning ${TEST_NO} "M" "Found one or more vulnerable packages."
ReportSuggestion ${TEST_NO} "Update your system with portupgrade or other tools"
@@ -685,12 +685,12 @@
sFIND=`${YUMBINARY} repolist 2>/dev/null | grep repolist | sed 's/ //g' | sed 's/[,.]//g' | awk -F ":" '{print $2}'`
if [ "$(echo ${sFIND} | egrep "^[0-9]+$")" -a "${sFIND}" = "0" ]; then
LogText "Result: YUM package update management failed"
- Display --indent 2 --text "- Checking YUM package management consistency" --result WARNING --color RED
+ Display --indent 2 --text "- Checking YUM package management consistency" --result "${STATUS_WARNING}" --color RED
ReportWarning ${TEST_NO} "M" "YUM is not properly configured or registered for this platform (no repolist found)"
#ReportSuggestion ${TEST_NO} "Check YUM registration for repository configuration (repolist)"
else
LogText "Result: YUM repository available (${sFIND})"
- Display --indent 2 --text "- Checking YUM package management consistency" --result OK --color GREEN
+ Display --indent 2 --text "- Checking YUM package management consistency" --result "${STATUS_OK}" --color GREEN
fi
fi
#
@@ -708,10 +708,10 @@
FIND=`/usr/bin/package-cleanup -q --dupes > /dev/null; echo $?`
if [ "${FIND}" = "0" ]; then
LogText "Result: No duplicate packages found"
- Display --indent 2 --text "- Checking package database duplicates" --result OK --color GREEN
+ Display --indent 2 --text "- Checking package database duplicates" --result "${STATUS_OK}" --color GREEN
else
LogText "Result: One or more duplicate packages found"
- Display --indent 2 --text "- Checking package database duplicates" --result WARNING --color RED
+ Display --indent 2 --text "- Checking package database duplicates" --result "${STATUS_WARNING}" --color RED
ReportWarning ${TEST_NO} "L" "Found one or more duplicate packages installed"
ReportSuggestion ${TEST_NO} "Run package-cleanup to solve duplicate package problems"
fi
@@ -721,15 +721,15 @@
FIND=`/usr/bin/package-cleanup --problems > /dev/null; echo $?`
if [ "${FIND}" = "0" ]; then
LogText "Result: No package database problems found"
- Display --indent 2 --text "- Checking package database for problems" --result OK --color GREEN
+ Display --indent 2 --text "- Checking package database for problems" --result "${STATUS_OK}" --color GREEN
else
LogText "Result: One or more problems found in package database"
- Display --indent 2 --text "- Checking package database for problems" --result WARNING --color RED
+ Display --indent 2 --text "- Checking package database for problems" --result "${STATUS_WARNING}" --color RED
ReportWarning ${TEST_NO} "L" "Found one or more problems in the package database"
ReportSuggestion ${TEST_NO} "Run package-cleanup to solve package problems"
fi
else
- Display --indent 2 --text "- yum-utils package not installed" --result SUGGESTION --color YELLOW
+ Display --indent 2 --text "- yum-utils package not installed" --result "${STATUS_SUGGESTION}" --color YELLOW
LogText "Result: YUM utils package not found"
ReportSuggestion ${TEST_NO} "Install package 'yum-utils' for better consistency checking of the package database"
fi
@@ -793,10 +793,10 @@
FIND2=`/usr/bin/yum list-sec security | awk '{ if($2=="security" || $2~"Sec") print $3","$5 }'`
if [ "${FIND2}" = "" ]; then
LogText "Result: no vulnerable packages found"
- Display --indent 2 --text "- Checking missing security packages" --result OK --color GREEN
+ Display --indent 2 --text "- Checking missing security packages" --result "${STATUS_OK}" --color GREEN
else
LogText "Result: found vulnerable package(s)"
- Display --indent 2 --text "- Checking missing security packages" --result WARNING --color RED
+ Display --indent 2 --text "- Checking missing security packages" --result "${STATUS_WARNING}" --color RED
for I in ${FIND2}; do
VULNERABLE_PACKAGES_FOUND=1
Report "vulnerable_package[]=${I}"
@@ -808,7 +808,7 @@
fi
else
LogText "Result: yum-security package not found"
- Display --indent 2 --text "- Checking missing security packages" --result SKIPPED --color YELLOW
+ Display --indent 2 --text "- Checking missing security packages" --result "${STATUS_SKIPPED}" --color YELLOW
ReportSuggestion ${TEST_NO} "Install package yum-plugin-security if possible, to maintain security updates easier (yum install yum-plugin-security)"
fi
fi
@@ -827,9 +827,9 @@
SearchItem "^gpgcheck=1$" "/etc/yum.conf"; if [ ${ITEM_FOUND} -eq 1 ]; then FOUND=1; fi
if [ ${FOUND} -eq 1 ]; then
LogText "Result: GPG check is enabled"
- Display --indent 2 --text "- Checking GPG checks (yum.conf)" --result OK --color GREEN
+ Display --indent 2 --text "- Checking GPG checks (yum.conf)" --result "${STATUS_OK}" --color GREEN
else
- Display --indent 2 --text "- Checking GPG checks (yum.conf)" --result DISABLED --color RED
+ Display --indent 2 --text "- Checking GPG checks (yum.conf)" --result "${STATUS_DISABLED}" --color RED
ReportWarning ${TEST_NO} "M" "No GPG signing option found in yum.conf"
fi
fi
@@ -849,7 +849,7 @@
FIND=`egrep "security.debian.org|security.ubuntu.com|-security " /etc/apt/sources.list | grep -v '#' | sed 's/ /!space!/g'`
if [ ! "${FIND}" = "" ]; then
FOUND=1
- Display --indent 2 --text "- Checking security repository in sources.list file" --result OK --color GREEN
+ Display --indent 2 --text "- Checking security repository in sources.list file" --result "${STATUS_OK}" --color GREEN
LogText "Result: Found security repository in /etc/apt/sources.list"
for I in ${FIND}; do
I=`echo ${I} | sed 's/!space!/ /g'`
@@ -862,7 +862,7 @@
FIND=`egrep -r "security.debian.org|security.ubuntu.com|-security " /etc/apt/sources.list.d | grep -v '#' | sed 's/ /!space!/g'`
if [ ! "${FIND}" = "" ]; then
FOUND=1
- Display --indent 2 --text "- Checking security repository in sources.list.d directory" --result OK --color GREEN
+ Display --indent 2 --text "- Checking security repository in sources.list.d directory" --result "${STATUS_OK}" --color GREEN
LogText "Result: Found security repository in one or more files in directory /etc/apt/sources.list.d"
for I in ${FIND}; do
I=`echo ${I} | sed 's/!space!/ /g'`
@@ -874,7 +874,7 @@
LogText "Result: security repository was found"
AddHP 3 3
else
- Display --indent 2 --text "- Checking security repository in sources.list file or directory" --result WARNING --color RED
+ Display --indent 2 --text "- Checking security repository in sources.list file or directory" --result "${STATUS_WARNING}" --color RED
ReportWarning ${TEST_NO} "M" "Can't find any security repository in /etc/apt/sources.list or sources.list.d directory"
AddHP 0 3
fi
@@ -893,11 +893,11 @@
LogText "Test: Package database consistency by running apt-get check"
FIND=`/usr/bin/apt-get -q=2 check 2> /dev/null; echo $?`
if [ "${FIND}" = "0" ]; then
- Display --indent 2 --text "- Checking APT package database" --result OK --color GREEN
+ Display --indent 2 --text "- Checking APT package database" --result "${STATUS_OK}" --color GREEN
LogText "Result: package database seems to be consistent."
else
LogText "Result: package database is most likely NOT consistent"
- Display --indent 2 --text "- Checking APT package database" --result WARNING --color RED
+ Display --indent 2 --text "- Checking APT package database" --result "${STATUS_WARNING}" --color RED
ReportWarning ${TEST_NO} "M" "apt-get check returned a non successful exit code."
ReportSuggestion ${TEST_NO} "Run apt-get to perform a manual package database consistency check."
fi
@@ -965,13 +965,13 @@
if [ ${VULNERABLE_PACKAGES_FOUND} -eq 1 ]; then
ReportWarning ${TEST_NO} "M" "Found one or more vulnerable packages."
ReportSuggestion ${TEST_NO} "Update your system with apt-get update, apt-get upgrade, apt-get dist-upgrade and/or unattended-upgrades"
- Display --indent 2 --text "- Checking vulnerable packages" --result WARNING --color RED
+ Display --indent 2 --text "- Checking vulnerable packages" --result "${STATUS_WARNING}" --color RED
else
- Display --indent 2 --text "- Checking vulnerable packages" --result OK --color GREEN
+ Display --indent 2 --text "- Checking vulnerable packages" --result "${STATUS_OK}" --color GREEN
LogText "Result: no vulnerable packages found"
fi
else
- Display --indent 2 --text "- Checking vulnerable packages (apt-get only)" --result DONE --color GREEN
+ Display --indent 2 --text "- Checking vulnerable packages (apt-get only)" --result "${STATUS_DONE}" --color GREEN
LogText "Result: test not fully executed (missing apt-check output)"
fi
fi
@@ -1007,10 +1007,10 @@
else
if [ "${FIND}" = "0" ]; then
LogText "Result; no vulnerable packages found via glsa-check"
- Display --indent 2 --text "- Checking vulnerable packages (glsa-check)" --result OK --color GREEN
+ Display --indent 2 --text "- Checking vulnerable packages (glsa-check)" --result "${STATUS_OK}" --color GREEN
else
VULNERABLE_PACKAGES_FOUND=1
- Display --indent 2 --text "- Checking vulnerable packages (glsa-check)" --result FOUND --color RED
+ Display --indent 2 --text "- Checking vulnerable packages (glsa-check)" --result "${STATUS_FOUND}" --color RED
LogText "Result: found ${FIND} security updates with glsa-check"
ReportWarning "${TEST_NO}" "H" "Found ${FIND} security update(s) with glsa-check."
LogText "Notes: Run 'glsa-check -t all' to see which GLSA(s) were identified."
@@ -1037,11 +1037,11 @@
FIND=`/usr/bin/apt-show-versions -u | sed 's/ /!space!/g'`
if [ "${FIND}" = "" ]; then
LogText "Result: no packages found which can be upgraded"
- Display --indent 2 --text "- Checking upgradeable packages" --result NONE --color GREEN
+ Display --indent 2 --text "- Checking upgradeable packages" --result "${STATUS_NONE}" --color GREEN
AddHP 3 3
else
LogText "Result: found one or more packages which can be upgraded"
- Display --indent 2 --text "- Checking upgradeable packages" --result FOUND --color YELLOW
+ Display --indent 2 --text "- Checking upgradeable packages" --result "${STATUS_FOUND}" --color YELLOW
# output: program/repository upgradeable from version X to Y
for I in ${FIND}; do
I=`echo ${I} | sed 's/!space!/ /g'`
@@ -1050,7 +1050,7 @@
fi
else
LogText "Result: /usr/bin/apt-show-versions not found"
- Display --indent 2 --text "- Checking upgradeable packages" --result SKIPPED --color WHITE
+ Display --indent 2 --text "- Checking upgradeable packages" --result "${STATUS_SKIPPED}" --color WHITE
ReportSuggestion ${TEST_NO} "Install package apt-show-versions for patch management purposes"
fi
fi
@@ -1064,7 +1064,7 @@
if [ ${SKIPTEST} -eq 0 ]; then
LogText "Test: checking for package audit tool"
if [ ${PACKAGE_AUDIT_TOOL_FOUND} -eq 0 ]; then
- Display --indent 2 --text "- Checking package audit tool" --result NONE --color RED
+ Display --indent 2 --text "- Checking package audit tool" --result "${STATUS_NONE}" --color RED
ReportSuggestion ${TEST_NO} "Install a package audit tool to determine vulnerable packages"
LogText "Result: no package audit tool found"
else