mirror of
https://github.com/CISOfy/lynis.git
synced 2026-03-11 08:55:28 +00:00
SSH-7408: use only the last occurrence of a configured option
This commit is contained in:
parent
94d0aaf8d4
commit
62f31a8b82
1 changed files with 2 additions and 1 deletions
|
|
@ -129,7 +129,8 @@
|
|||
WEAKVALUE=`echo ${I} | cut -d ':' -f2 | cut -d',' -f3`
|
||||
TESTTYPE=`echo ${I} | cut -d ':' -f3`
|
||||
RESULT="NONE"
|
||||
FOUNDVALUE=`awk -v OPT="${OPTIONNAME}" 'index($0, OPT) == 1 { print toupper($2) }' ${SSH_DAEMON_CONFIG}`
|
||||
# Get value and use the last occurrence
|
||||
FOUNDVALUE=`awk -v OPT="${OPTIONNAME}" 'index($0, OPT) == 1 { print toupper($2) }' ${SSH_DAEMON_CONFIG} | tail -1`
|
||||
LogText "Test: Checking ${OPTIONNAME} in ${SSH_DAEMON_CONFIG}"
|
||||
|
||||
if [ ! "${FOUNDVALUE}" = "" ]; then
|
||||
|
|
|
|||
Loading…
Reference in a new issue