mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-01 02:54:31 +02:00
Fix STRG-1840 (Check for disabled USB storage)
This commit is contained in:
parent
424f6cccd0
commit
c998924b51
@ -33,7 +33,7 @@
|
|||||||
if [ -d /etc/modprobe.d ]; then
|
if [ -d /etc/modprobe.d ]; then
|
||||||
FIND=`ls /etc/modprobe.d/* 2> /dev/null`
|
FIND=`ls /etc/modprobe.d/* 2> /dev/null`
|
||||||
if [ ! "${FIND}" = "" ]; then
|
if [ ! "${FIND}" = "" ]; then
|
||||||
FIND=`grep -r "install usb-storage /bin/(false|true)" /etc/modprobe.d/* | grep "usb-storage" | grep -v "#"`
|
FIND=`grep -r "install usb-storage /bin/\(false\|true\)" /etc/modprobe.d/* | grep "usb-storage" | grep -v "#"`
|
||||||
FIND2=`egrep -r "^blacklist (usb_storage|usb-storage)" /etc/modprobe.d/*`
|
FIND2=`egrep -r "^blacklist (usb_storage|usb-storage)" /etc/modprobe.d/*`
|
||||||
if [ ! "${FIND}" = "" -o ! "${FIND2}" = "" ]; then
|
if [ ! "${FIND}" = "" -o ! "${FIND2}" = "" ]; then
|
||||||
FOUND=1
|
FOUND=1
|
||||||
@ -44,7 +44,7 @@
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ -f /etc/modprobe.conf ]; then
|
if [ -f /etc/modprobe.conf ]; then
|
||||||
FIND=`grep "install usb-storage /bin/(false|true)" /etc/modprobe.conf | grep "usb-storage" | grep -v "#"`
|
FIND=`grep "install usb-storage /bin/\(false\|true\)" /etc/modprobe.conf | grep "usb-storage" | grep -v "#"`
|
||||||
if [ ! "${FIND}" = "" ]; then
|
if [ ! "${FIND}" = "" ]; then
|
||||||
FOUND=1
|
FOUND=1
|
||||||
logtext "Result: found usb-storage driver in disabled state"
|
logtext "Result: found usb-storage driver in disabled state"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user