diff options
author | mboelen <michael@cisofy.com> | 2014-10-06 22:57:56 +0400 |
---|---|---|
committer | mboelen <michael@cisofy.com> | 2014-10-06 22:57:56 +0400 |
commit | 81d910c05004cf25178b5f21c74fa3bba27e7156 (patch) | |
tree | 203813271c5d7925bd01183c0a32d47e4a3670d2 /include/tests_shells | |
parent | 13fd4647b8890726aff9b3f7340f8d8c5c19b20c (diff) |
When searching for bash shell, skip comment lines and only take first hit (e.g. Fedora has multiple hits) [SHLL-6290]
Diffstat (limited to 'include/tests_shells')
-rw-r--r-- | include/tests_shells | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/tests_shells b/include/tests_shells index 5a0c3d34..c0a5336f 100644 --- a/include/tests_shells +++ b/include/tests_shells @@ -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" |