mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-26 15:24:21 +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`
|
WEAKVALUE=`echo ${I} | cut -d ':' -f2 | cut -d',' -f3`
|
||||||
TESTTYPE=`echo ${I} | cut -d ':' -f3`
|
TESTTYPE=`echo ${I} | cut -d ':' -f3`
|
||||||
RESULT="NONE"
|
RESULT="NONE"
|
||||||
|
|
||||||
|
if ! SkipAtomicTest "${TEST_NO}:${OPTIONNAME_LOWER}"; then
|
||||||
|
|
||||||
# Get value and use the last occurrence
|
# 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`
|
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}"
|
LogText "Test: Checking ${OPTIONNAME} in ${SSH_OPTIONS_FILE}"
|
||||||
@ -198,7 +201,6 @@
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ "${RESULT}" = "GOOD" ]; then
|
if [ "${RESULT}" = "GOOD" ]; then
|
||||||
LogText "Result: SSH option ${OPTIONNAME} is configured very well"
|
LogText "Result: SSH option ${OPTIONNAME} is configured very well"
|
||||||
Display --indent 4 --text "- SSH option: ${OPTIONNAME}" --result OK --color GREEN
|
Display --indent 4 --text "- SSH option: ${OPTIONNAME}" --result OK --color GREEN
|
||||||
@ -223,7 +225,7 @@
|
|||||||
LogText "Result: Option ${OPTIONNAME} not found in output"
|
LogText "Result: Option ${OPTIONNAME} not found in output"
|
||||||
Display --indent 4 --text "- SSH option: ${OPTIONNAME}" --result "NOT FOUND" --color WHITE
|
Display --indent 4 --text "- SSH option: ${OPTIONNAME}" --result "NOT FOUND" --color WHITE
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user