Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Boelen <michael.boelen@cisofy.com>2019-03-29 14:30:12 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2019-03-29 14:30:12 +0300
commit8a9edeb40b018dec05f9dc0418971e50f55026db (patch)
tree710daeff2b93965073628a1e579e60f3cd0c891e
parentf9bcf26f25e2bd07c05e840362530abfda438a79 (diff)
[AUTH-9278] style change, description, allow different root directory
-rw-r--r--include/tests_authentication9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/tests_authentication b/include/tests_authentication
index 9fe8af43..2ede2b7d 100644
--- a/include/tests_authentication
+++ b/include/tests_authentication
@@ -698,27 +698,28 @@
#
# Test : AUTH-9278
# 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
- 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
LogText "Test: checking presence ${FILE}"
if [ -f ${FILE} ]; then
LogText "Result: file ${FILE} exists"
LogText "Test: checking presence LDAP module"
FIND=$(${GREPBINARY} "^auth.*ldap" ${FILE})
- if [ ! "${FIND}" = "" ]; then
+ if [ ! -z "${FIND}" ]; then
LogText "Result: LDAP module present"
LogText "Output: ${FIND}"
LDAP_AUTH_ENABLED=1
LDAP_PAM_ENABLED=1
- else
+ else
LogText "Result: LDAP module not found"
fi
else
LogText "Result: file ${FILE} not found, skipping test"
fi
done
+
if [ ${LDAP_PAM_ENABLED} -eq 1 ]; then
Display --indent 2 --text "- LDAP module in PAM" --result "${STATUS_FOUND}" --color GREEN
else