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:
mboelen 2014-10-06 20:57:56 +02:00
parent 13fd4647b8
commit 81d910c050
1 changed files with 1 additions and 1 deletions

View File

@ -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"