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-07-09 12:42:04 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2019-07-09 12:42:04 +0300
commit09d8832a0b4b922e90b37c358afdeceda2b603c3 (patch)
tree1d21461a838a21c0b530373e808546f8f3000a02 /include/tests_crypto
parent7650dd441d67962cd3643833a60c872ce85deba2 (diff)
[CRYP-7903] enhanced test to properly work
Diffstat (limited to 'include/tests_crypto')
-rw-r--r--include/tests_crypto7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/tests_crypto b/include/tests_crypto
index 22199016..6d0d5384 100644
--- a/include/tests_crypto
+++ b/include/tests_crypto
@@ -131,11 +131,12 @@
#
# Test : CRYP-7930
# Description : Determine if system uses disk or file encryption
- Register --test-no CRYP-7930 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Determine if system uses disk or file encryption"
+ Register --test-no CRYP-7930 --weight L --network NO --category security --description "Determine if system uses disk or file encryption"
if [ ${SKIPTEST} -eq 0 ]; then
FILE="${ROOTDIR}etc/crypttab"
if [ -f ${FILE} ]; then
- DATA=$(${GREPBINARY} "^[a-z]" ${ROOTDIR}etc/crypttab | ${SEDBINARY} 's/[:blank:]/__space__/g' | ${TRBINARY} -d '[:cntrl:]')
+ LogText "Result: crypttab file (${FILE}) exists"
+ DATA=$(${GREPBINARY} "^[a-z]" ${FILE} | ${TRBINARY} -cd '[:alnum:]_\-=,\n\t ' | ${SEDBINARY} 's/[[:blank:]]/__space__/g')
for LINE in ${DATA}; do
LINE=$(echo ${LINE} | ${SEDBINARY} 's/__space__/ /g')
if ContainsString "luks," "${LINE}"; then
@@ -145,6 +146,8 @@
fi
done
unset DATA LINE PARTITION
+ else
+ LogText "Result: crypttab file (${FILE}) does not exist"
fi
fi
#