diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2019-07-09 11:33:51 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2019-07-09 11:33:51 +0300 |
commit | 6891f64c393efdfe3d9157b0d4a4bd84ff0c6298 (patch) | |
tree | 7abdbcb8b968038db4cd93ea085a7d84ab52f294 /include/tests_crypto | |
parent | f3f6be6630f3b3ecfa40daf99e2e8ea81022849c (diff) |
Added CRYP-7930
Diffstat (limited to 'include/tests_crypto')
-rw-r--r-- | include/tests_crypto | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/tests_crypto b/include/tests_crypto index 9be27b6f..22199016 100644 --- a/include/tests_crypto +++ b/include/tests_crypto @@ -129,6 +129,27 @@ # ################################################################################# # + # 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" + 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:]') + for LINE in ${DATA}; do + LINE=$(echo ${LINE} | ${SEDBINARY} 's/__space__/ /g') + if ContainsString "luks," "${LINE}"; then + PARTITION=$(echo ${LINE} | ${AWKBINARY} '{print $1}' | ${AWKBINARY} -F_ '{print $1}') + LogText "Result: Found LUKS encryption on partition ${PARTITION}" + Report "encryption[]=luks,partition,${PARTITION}" + fi + done + unset DATA LINE PARTITION + fi + fi +# +################################################################################# +# WaitForKeyPress |