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>2016-07-30 14:54:04 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2016-07-30 14:54:04 +0300
commit0ec7f45f05acd51b1ed27ab9f35ed527bed5cad5 (patch)
treed6dce22c3c73dd050753813fc1c4761db42ce925
parent0e18551b2c530ae137b7bd7493ff4898d982535c (diff)
[AUTH-9268] Improve readability of test
-rw-r--r--include/tests_authentication23
1 files changed, 12 insertions, 11 deletions
diff --git a/include/tests_authentication b/include/tests_authentication
index c25b7ca0..afaccd24 100644
--- a/include/tests_authentication
+++ b/include/tests_authentication
@@ -579,28 +579,29 @@
if [ ${SKIPTEST} -eq 0 ]; then
FOUND=0
LogText "Test: Searching pam modules"
- for I in ${PAM_FILE_LOCATIONS}; do
- LogText "Test: Checking ${I}"
- if [ -d ${I} -a ! -L ${I} ]; then
- LogText "Result: directory ${I} exists"
+ for DIR in ${PAM_FILE_LOCATIONS}; do
+ LogText "Test: Checking ${DIR}"
+ if [ -d ${DIR} -a ! -L ${DIR} ]; then
+ LogText "Result: directory ${DIR} exists"
# Search in the specified directory
- FIND=`find ${I} -maxdepth 1 -type f -name "pam_*.so" -print | sort`
+ FIND=`find ${DIR} -maxdepth 1 -type f -name "pam_*.so" -print | sort`
if [ ! "${FIND}" = "" ]; then FOUND=1; fi
- for I in ${FIND}; do
- LogText "Found file: ${I}"
- Report "pam_module[]=${I}"
+ for FILE in ${FIND}; do
+ LogText "Found file: ${FILE}"
+ Report "pam_module[]=${FILE}"
done
- else
- LogText "Result: directory ${I} could not be found or is a symlink to another directory"
+ else
+ LogText "Result: directory ${DIR} could not be found or is a symlink to another directory"
fi
done
# Check if we found at least one module
if [ ${FOUND} -eq 0 ]; then
Display --indent 2 --text "- Checking PAM modules" --result "${STATUS_NOT_FOUND}" --color WHITE
LogText "Result: no PAM modules found"
- else
+ else
Display --indent 2 --text "- Checking PAM modules" --result "${STATUS_FOUND}" --color GREEN
fi
+ unset DIR; unset FILE; unset FIND
fi
#
#################################################################################