mirror of https://github.com/CISOfy/lynis.git
Properly parse PAM lines and add them to report [AUTH-9264]
This commit is contained in:
parent
b81d3cc3e0
commit
3609da194a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue