mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-27 07:44:14 +02:00
Renamed logtext and report function calls
This commit is contained in:
parent
11d0dabf4f
commit
2a22e5c42a
@ -25,7 +25,7 @@
|
|||||||
Display --indent 2 --text "- Checking profiles..."
|
Display --indent 2 --text "- Checking profiles..."
|
||||||
|
|
||||||
for PROFILE in ${PROFILES}; do
|
for PROFILE in ${PROFILES}; do
|
||||||
logtext "Reading profile/configuration ${PROFILE}"
|
LogText "Reading profile/configuration ${PROFILE}"
|
||||||
FIND=`egrep "^config:|^[a-z-].*=" ${PROFILE} | sed 's/ /!space!/g'`
|
FIND=`egrep "^config:|^[a-z-].*=" ${PROFILE} | sed 's/ /!space!/g'`
|
||||||
for I in ${FIND}; do
|
for I in ${FIND}; do
|
||||||
if ContainsString "config:" "${I}"; then
|
if ContainsString "config:" "${I}"; then
|
||||||
@ -49,7 +49,7 @@
|
|||||||
hipaa) COMPLIANCE_ENABLE_HIPAA=1 ; Debug "Compliance scanning for HIPAA is enabled" ;;
|
hipaa) COMPLIANCE_ENABLE_HIPAA=1 ; Debug "Compliance scanning for HIPAA is enabled" ;;
|
||||||
iso27001) COMPLIANCE_ENABLE_ISO27001=1 ; Debug "Compliance scanning for ISO27001 is enabled" ;;
|
iso27001) COMPLIANCE_ENABLE_ISO27001=1 ; Debug "Compliance scanning for ISO27001 is enabled" ;;
|
||||||
pci-dss) COMPLIANCE_ENABLE_PCI_DSS=1 ; Debug "Compliance scanning for PCI DSS is enabled" ;;
|
pci-dss) COMPLIANCE_ENABLE_PCI_DSS=1 ; Debug "Compliance scanning for PCI DSS is enabled" ;;
|
||||||
*) logtext "Result: Unknown compliance standard configured" ;;
|
*) LogText "Result: Unknown compliance standard configured" ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
@ -101,7 +101,7 @@
|
|||||||
|
|
||||||
# Skip FreeBSD port audit
|
# Skip FreeBSD port audit
|
||||||
freebsd_skip_portaudit)
|
freebsd_skip_portaudit)
|
||||||
logtext "Option set: Skip FreeBSD portaudit"
|
LogText "Option set: Skip FreeBSD portaudit"
|
||||||
OPTION_FREEBSD_SKIP_PORTAUDIT="${VALUE}"
|
OPTION_FREEBSD_SKIP_PORTAUDIT="${VALUE}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@ -113,12 +113,12 @@
|
|||||||
# Lynis Enterprise license key
|
# Lynis Enterprise license key
|
||||||
license_key)
|
license_key)
|
||||||
LICENSE_KEY="${VALUE}"
|
LICENSE_KEY="${VALUE}"
|
||||||
report "license_key=${LICENSE_KEY}"
|
Report "license_key=${LICENSE_KEY}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# Do (not) log tests if they have an different operating system
|
# Do (not) log tests if they have an different operating system
|
||||||
log_tests_incorrect_os)
|
log_tests_incorrect_os)
|
||||||
logtext "Option set: No logging for incorrect OS"
|
LogText "Option set: No logging for incorrect OS"
|
||||||
if [ "${VALUE}" = "no" ]; then LOG_INCORRECT_OS=0; else LOG_INCORRECT_OS=1; fi
|
if [ "${VALUE}" = "no" ]; then LOG_INCORRECT_OS=0; else LOG_INCORRECT_OS=1; fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@ -175,7 +175,7 @@
|
|||||||
# Tests to always skip (useful for false positives or problematic tests)
|
# Tests to always skip (useful for false positives or problematic tests)
|
||||||
test_skip_always)
|
test_skip_always)
|
||||||
TEST_SKIP_ALWAYS="${VALUE}"
|
TEST_SKIP_ALWAYS="${VALUE}"
|
||||||
logtext "Tests to be skipped: ${VALUE}"
|
LogText "Tests to be skipped: ${VALUE}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# Do not check the latest version on the internet
|
# Do not check the latest version on the internet
|
||||||
@ -248,7 +248,7 @@
|
|||||||
|
|
||||||
# Catch all bad options and bail out
|
# Catch all bad options and bail out
|
||||||
*)
|
*)
|
||||||
logtext "Unknown option ${OPTION} (with value: ${VALUE})"
|
LogText "Unknown option ${OPTION} (with value: ${VALUE})"
|
||||||
echo "Fatal error: found errors in profile ${PROFILE}"
|
echo "Fatal error: found errors in profile ${PROFILE}"
|
||||||
echo "Unknown option '${OPTION}' found (with value: ${VALUE})"
|
echo "Unknown option '${OPTION}' found (with value: ${VALUE})"
|
||||||
ExitFatal
|
ExitFatal
|
||||||
@ -261,13 +261,13 @@
|
|||||||
#
|
#
|
||||||
#################################################################################
|
#################################################################################
|
||||||
#
|
#
|
||||||
Logtext "Skip tests: ${SKIP_TESTS}"
|
LogText "Skip tests: ${SKIP_TESTS}"
|
||||||
#
|
#
|
||||||
#################################################################################
|
#################################################################################
|
||||||
#
|
#
|
||||||
# Add group name to report
|
# Add group name to report
|
||||||
if [ ! "${GROUP_NAME}" = "" ]; then
|
if [ ! "${GROUP_NAME}" = "" ]; then
|
||||||
report "group=${GROUP_NAME}"
|
Report "group=${GROUP_NAME}"
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
#################################################################################
|
#################################################################################
|
||||||
@ -276,12 +276,12 @@
|
|||||||
|
|
||||||
if [ "${MACHINE_ROLE}" = "" ]; then
|
if [ "${MACHINE_ROLE}" = "" ]; then
|
||||||
MACHINE_ROLE="server"
|
MACHINE_ROLE="server"
|
||||||
logtext "Set option to default value: MACHINE_ROLE --> ${MACHINE_ROLE}"
|
LogText "Set option to default value: MACHINE_ROLE --> ${MACHINE_ROLE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${NTPD_ROLE}" = "" ]; then
|
if [ "${NTPD_ROLE}" = "" ]; then
|
||||||
NTPD_ROLE="client"
|
NTPD_ROLE="client"
|
||||||
logtext "Set option to default value: NTPD_ROLE --> ${NTPD_ROLE}"
|
LogText "Set option to default value: NTPD_ROLE --> ${NTPD_ROLE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user