mirror of https://github.com/CISOfy/lynis.git
When searching for bash shell, skip comment lines and only take first hit (e.g. Fedora has multiple hits) [SHLL-6290]
This commit is contained in:
parent
13fd4647b8
commit
81d910c050
|
@ -215,7 +215,7 @@
|
|||
FOUND=0
|
||||
Display --indent 2 --text "- Testing for Shellshock vulnerability"
|
||||
logtext "Test: Check if bash is in the list of shells."
|
||||
FIND=`egrep '(/usr)?(/local)?/bin/bash' /etc/shells`
|
||||
FIND=`egrep '(/usr)?(/local)?/bin/bash' /etc/shells | grep -v "^#" | head -1`
|
||||
if [ ! "${FIND}" = "" -a ! -L ${FIND} ]; then
|
||||
logtext "Result: found ${FIND} as a valid shell"
|
||||
|
||||
|
|
Loading…
Reference in New Issue