mirror of https://github.com/CISOfy/lynis.git
fix for #781 - run lsblk without --paths
This commit is contained in:
parent
c16133b255
commit
62419033f5
|
@ -138,9 +138,9 @@
|
||||||
FOUND=0
|
FOUND=0
|
||||||
|
|
||||||
# cryptsetup only works as root
|
# cryptsetup only works as root
|
||||||
if [ -n "${LSBLKBINARY}" -a -n "${CRYPTSETUPBINARY}" -a ${FORENSICS_MODE} -eq 0 ]; then
|
if [ -n "${LSBLKBINARY}" ] && [ -n "${CRYPTSETUPBINARY}" ] && [ ${FORENSICS_MODE} -eq 0 ]; then
|
||||||
for BLOCK_DEV in $(${LSBLKBINARY} --noheadings --list --paths -o NAME); do
|
for BLOCK_DEV in $(${LSBLKBINARY} --noheadings --list -o NAME 2> /dev/null | cut -d' ' -f1); do
|
||||||
if ${CRYPTSETUPBINARY} isLuks ${BLOCK_DEV} 2> /dev/null; then
|
if ${CRYPTSETUPBINARY} isLuks $(${FINDBINARY} /dev/ -name "${BLOCK_DEV}" 2> /dev/null) 2> /dev/null; then
|
||||||
LogText "Result: Found LUKS encrypted block device: ${BLOCK_DEV}"
|
LogText "Result: Found LUKS encrypted block device: ${BLOCK_DEV}"
|
||||||
Report "encryption[]=luks,block_device,${BLOCK_DEV}"
|
Report "encryption[]=luks,block_device,${BLOCK_DEV}"
|
||||||
FOUND=$((FOUND +1))
|
FOUND=$((FOUND +1))
|
||||||
|
|
Loading…
Reference in New Issue