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:
authorMichael Boelen <michael.boelen@cisofy.com>2018-01-23 16:29:37 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2018-01-23 16:29:37 +0300
commit3ba399c4c30aebffa48e568c014448e862bcf5e3 (patch)
tree858201c6ed765bfd8a6e96b4dc8f87101773ce5d /include/profiles
parentbae33db57b8bf08dae700b986151a8c9d7aee57f (diff)
Mark deprecated options as a warning
Diffstat (limited to 'include/profiles')
-rw-r--r--include/profiles14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/profiles b/include/profiles
index b2261ba1..c23e3706 100644
--- a/include/profiles
+++ b/include/profiles
@@ -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