mirror of https://github.com/CISOfy/lynis.git
[AUTH-9278] style change, description, allow different root directory
This commit is contained in:
parent
f9bcf26f25
commit
8a9edeb40b
|
@ -698,16 +698,16 @@
|
||||||
#
|
#
|
||||||
# Test : AUTH-9278
|
# Test : AUTH-9278
|
||||||
# Description : Search LDAP support in PAM files
|
# Description : Search LDAP support in PAM files
|
||||||
Register --test-no AUTH-9278 --weight L --network NO --category security --description "Checking LDAP pam status"
|
Register --test-no AUTH-9278 --weight L --network NO --category security --description "Determine LDAP support in PAM files"
|
||||||
if [ ${SKIPTEST} -eq 0 ]; then
|
if [ ${SKIPTEST} -eq 0 ]; then
|
||||||
AUTH_FILES="/etc/pam.d/common-auth /etc/pam.d/system-auth"
|
AUTH_FILES="${ROOTDIR}etc/pam.d/common-auth ${ROOTDIR}etc/pam.d/system-auth"
|
||||||
for FILE in ${AUTH_FILES}; do
|
for FILE in ${AUTH_FILES}; do
|
||||||
LogText "Test: checking presence ${FILE}"
|
LogText "Test: checking presence ${FILE}"
|
||||||
if [ -f ${FILE} ]; then
|
if [ -f ${FILE} ]; then
|
||||||
LogText "Result: file ${FILE} exists"
|
LogText "Result: file ${FILE} exists"
|
||||||
LogText "Test: checking presence LDAP module"
|
LogText "Test: checking presence LDAP module"
|
||||||
FIND=$(${GREPBINARY} "^auth.*ldap" ${FILE})
|
FIND=$(${GREPBINARY} "^auth.*ldap" ${FILE})
|
||||||
if [ ! "${FIND}" = "" ]; then
|
if [ ! -z "${FIND}" ]; then
|
||||||
LogText "Result: LDAP module present"
|
LogText "Result: LDAP module present"
|
||||||
LogText "Output: ${FIND}"
|
LogText "Output: ${FIND}"
|
||||||
LDAP_AUTH_ENABLED=1
|
LDAP_AUTH_ENABLED=1
|
||||||
|
@ -719,6 +719,7 @@
|
||||||
LogText "Result: file ${FILE} not found, skipping test"
|
LogText "Result: file ${FILE} not found, skipping test"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ ${LDAP_PAM_ENABLED} -eq 1 ]; then
|
if [ ${LDAP_PAM_ENABLED} -eq 1 ]; then
|
||||||
Display --indent 2 --text "- LDAP module in PAM" --result "${STATUS_FOUND}" --color GREEN
|
Display --indent 2 --text "- LDAP module in PAM" --result "${STATUS_FOUND}" --color GREEN
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue