diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2019-07-03 16:39:26 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2019-07-03 16:39:26 +0300 |
commit | ade3117307930cda0e9ab2460a08c0cf9b653f35 (patch) | |
tree | b92ffac3bf11b0d5240eb432449178bd90b23733 /lynis | |
parent | 1f0c31fcad5f747a9402683c09e6352d72712ee1 (diff) |
New option to disable plugins via profile
Diffstat (limited to 'lynis')
-rwxr-xr-x | lynis | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -851,8 +851,17 @@ ${NORMAL} LogText "Action: checking plugin status in profile: ${PROFILE}" FIND3=$(grep "^plugin=${FIND2}" ${PROFILE}) if [ ! -z "${FIND3}" ]; then - LogText "Result: plugin enabled in profile (${PROFILE})" - PLUGIN_ENABLED_STATE=1 + FOUND=0 + for I in ${DISABLED_PLUGINS}; do + if [ "${I}" = "${FIND2}" ]; then + FOUND=1 + LogText "Result: plugin ${FIND2} is specifically disabled" + fi + done + if [ ${FOUND} -eq 0 ]; then + LogText "Result: plugin enabled in profile (${PROFILE})" + PLUGIN_ENABLED_STATE=1 + fi fi done if [ ${PLUGIN_ENABLED_STATE} -eq 1 ]; then |