mirror of
https://github.com/CISOfy/lynis.git
synced 2025-04-08 17:15:25 +02:00
Mark deprecated options as a warning
This commit is contained in:
parent
bae33db57b
commit
3ba399c4c3
@ -25,6 +25,7 @@
|
||||
# Set default values (should be equal to default.prf)
|
||||
SETTING_LOG_TESTS_INCORRECT_OS=1
|
||||
SETTING_SHOW_REPORT_SOLUTION=0
|
||||
DEPRECATED_OPTION=""
|
||||
#
|
||||
#################################################################################
|
||||
#
|
||||
@ -37,6 +38,7 @@
|
||||
# Old style configuration
|
||||
OPTION=$(echo ${CONFIGOPTION} | cut -d ':' -f2)
|
||||
VALUE=$(echo ${CONFIGOPTION} | cut -d ':' -f3 | sed 's/!space!/ /g')
|
||||
DEPRECATED_OPTION="${OPTION}"
|
||||
else
|
||||
OPTION=$(echo ${CONFIGOPTION} | cut -d '=' -f1)
|
||||
VALUE=$(echo ${CONFIGOPTION} | cut -d '=' -f2 | sed 's/!space!/ /g')
|
||||
@ -167,10 +169,11 @@
|
||||
OPTION_FREEBSD_SKIP_PORTAUDIT="${VALUE}"
|
||||
;;
|
||||
|
||||
# Lynis Enterprise: group name
|
||||
# Lynis Enterprise: group name - deprecrated option
|
||||
group)
|
||||
GROUP_NAME="${VALUE}"
|
||||
AddSetting "group" "${GROUP_NAME}" "Group"
|
||||
DEPRECATED_OPTION="group"
|
||||
;;
|
||||
|
||||
hostalias | host-alias)
|
||||
@ -488,7 +491,7 @@
|
||||
#
|
||||
#################################################################################
|
||||
#
|
||||
# Add group name to report
|
||||
# Add group name to report - deprecated
|
||||
if [ ! -z "${GROUP_NAME}" ]; then Report "group=${GROUP_NAME}"; fi
|
||||
#
|
||||
#################################################################################
|
||||
@ -516,6 +519,13 @@
|
||||
#
|
||||
#################################################################################
|
||||
#
|
||||
if [ ! -z "${DEPRECATED_OPTION}" ]; then
|
||||
ReportWarning "LYNIS" "One or more deprecated options used" "${DEPRECATED_OPTION}" "Update your profile"
|
||||
fi
|
||||
#
|
||||
#################################################################################
|
||||
#
|
||||
|
||||
Display --indent 2 --text "- Checking profiles..." --result "DONE" --color GREEN
|
||||
|
||||
LogTextBreak
|
||||
|
Loading…
x
Reference in New Issue
Block a user