diff options
author | Kristian Schuster <kristian.s@outlook.de> | 2019-10-19 01:34:25 +0300 |
---|---|---|
committer | Kristian Schuster <kristian.s@outlook.de> | 2019-10-19 01:34:25 +0300 |
commit | 62419033f5049a39e177953a54e180bfe0123211 (patch) | |
tree | 791479d71729ebb818709f9e512f728d008ef5e9 /include/tests_crypto | |
parent | c16133b25545078e166ba05c10b2f53cfd88bbd4 (diff) |
fix for #781 - run lsblk without --paths
Diffstat (limited to 'include/tests_crypto')
-rw-r--r-- | include/tests_crypto | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/tests_crypto b/include/tests_crypto index 77be22f2..96dc067a 100644 --- a/include/tests_crypto +++ b/include/tests_crypto @@ -138,9 +138,9 @@ FOUND=0 # cryptsetup only works as root - if [ -n "${LSBLKBINARY}" -a -n "${CRYPTSETUPBINARY}" -a ${FORENSICS_MODE} -eq 0 ]; then - for BLOCK_DEV in $(${LSBLKBINARY} --noheadings --list --paths -o NAME); do - if ${CRYPTSETUPBINARY} isLuks ${BLOCK_DEV} 2> /dev/null; then + if [ -n "${LSBLKBINARY}" ] && [ -n "${CRYPTSETUPBINARY}" ] && [ ${FORENSICS_MODE} -eq 0 ]; then + for BLOCK_DEV in $(${LSBLKBINARY} --noheadings --list -o NAME 2> /dev/null | cut -d' ' -f1); do + if ${CRYPTSETUPBINARY} isLuks $(${FINDBINARY} /dev/ -name "${BLOCK_DEV}" 2> /dev/null) 2> /dev/null; then LogText "Result: Found LUKS encrypted block device: ${BLOCK_DEV}" Report "encryption[]=luks,block_device,${BLOCK_DEV}" FOUND=$((FOUND +1)) |