From 3609da194a68d5ac2335e8b42af95f1491e4a71f Mon Sep 17 00:00:00 2001 From: mboelen Date: Tue, 4 Nov 2014 00:42:37 +0100 Subject: [PATCH] Properly parse PAM lines and add them to report [AUTH-9264] --- include/tests_authentication | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/tests_authentication b/include/tests_authentication index f9f61d87..1a0e152f 100644 --- a/include/tests_authentication +++ b/include/tests_authentication @@ -636,13 +636,13 @@ logtext "Result: file /etc/pam.conf exists" Display --indent 2 --text "- Checking PAM configuration files (pam.conf)" --result FOUND --color GREEN logtext "Test: searching PAM configuration files" - FIND=`cat /etc/pam.conf | grep -v "^#" | grep -v "^$" | sed 's/ /!space!/g'` + FIND=`cat /etc/pam.conf | grep -v "^#" | grep -v "^$" | sed 's/[[:space:]]/ /g' | sed 's/ / /g' | sed 's/ /:space:/g'` if [ "${FIND}" = "" ]; then logtext "Result: File has no configuration options defined (empty, or only filled with comments and empty lines)" else logtext "Result: found one or more configuration lines" for I in ${FIND}; do - I=`echo ${I} | sed 's/!space!/ /g'` + I=`echo ${I} | sed 's/:space:/ /g'` logtext "Found line: ${I}" done fi