From 81d910c05004cf25178b5f21c74fa3bba27e7156 Mon Sep 17 00:00:00 2001 From: mboelen Date: Mon, 6 Oct 2014 20:57:56 +0200 Subject: When searching for bash shell, skip comment lines and only take first hit (e.g. Fedora has multiple hits) [SHLL-6290] --- include/tests_shells | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/tests_shells') 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" -- cgit v1.2.3