mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-25 23:05:01 +02:00
[SSH-7408] Allow skipping some of the SSH tests
This commit is contained in:
parent
e9eae5b8b5
commit
a2594fc370
@ -143,6 +143,9 @@
|
||||
WEAKVALUE=`echo ${I} | cut -d ':' -f2 | cut -d',' -f3`
|
||||
TESTTYPE=`echo ${I} | cut -d ':' -f3`
|
||||
RESULT="NONE"
|
||||
|
||||
if ! SkipAtomicTest "${TEST_NO}:${OPTIONNAME_LOWER}"; then
|
||||
|
||||
# Get value and use the last occurrence
|
||||
FOUNDVALUE=`awk -v OPT="${OPTIONNAME_LOWER}" 'index($0, OPT) == 1 { print toupper($2) }' ${SSH_OPTIONS_FILE} | tail -1`
|
||||
LogText "Test: Checking ${OPTIONNAME} in ${SSH_OPTIONS_FILE}"
|
||||
@ -198,7 +201,6 @@
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [ "${RESULT}" = "GOOD" ]; then
|
||||
LogText "Result: SSH option ${OPTIONNAME} is configured very well"
|
||||
Display --indent 4 --text "- SSH option: ${OPTIONNAME}" --result OK --color GREEN
|
||||
@ -223,7 +225,7 @@
|
||||
LogText "Result: Option ${OPTIONNAME} not found in output"
|
||||
Display --indent 4 --text "- SSH option: ${OPTIONNAME}" --result "NOT FOUND" --color WHITE
|
||||
fi
|
||||
|
||||
fi
|
||||
done
|
||||
fi
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user