mirror of https://github.com/CISOfy/lynis.git
Merge pull request #795 from Schmuuu/crypto/fix-lsblk-check
fix for #781 - run lsblk without --paths
This commit is contained in:
commit
0fe16a286e
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue