Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormboelen <michael@cisofy.com>2015-10-01 20:56:39 +0300
committermboelen <michael@cisofy.com>2015-10-01 20:56:39 +0300
commitd6a8a3c425755a29863167acbee270628084dd8d (patch)
tree6d50fe3748350089d16ba6bfd90e41ef674fa7ef /include/tests_storage
parenta6ac097a933881233e4dbfd114af6272b8f67d35 (diff)
Correct testing for disabled/blacklisted USB storage driver
Diffstat (limited to 'include/tests_storage')
-rw-r--r--include/tests_storage6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/tests_storage b/include/tests_storage
index dbae4aca..5d84e118 100644
--- a/include/tests_storage
+++ b/include/tests_storage
@@ -33,18 +33,18 @@
if [ -d /etc/modprobe.d ]; then
FIND=`ls /etc/modprobe.d/* 2> /dev/null`
if [ ! "${FIND}" = "" ]; then
- FIND=`grep -r "install usb-storage /bin/\(false\|true\)" /etc/modprobe.d/* | grep "usb-storage" | grep -v "#"`
+ FIND=`egrep -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/*`
if [ ! "${FIND}" = "" -o ! "${FIND2}" = "" ]; then
FOUND=1
- logtext "Result: found usb-storage driver in disabled state"
+ logtext "Result: found usb-storage driver in disabled state (blacklisted)"
fi
else
logtext "Result: uncommon situation. Found /etc/modprobe.d directory, but no files in it."
fi
fi
if [ -f /etc/modprobe.conf ]; then
- FIND=`grep "install usb-storage /bin/\(false\|true\)" /etc/modprobe.conf | grep "usb-storage" | grep -v "#"`
+ FIND=`egrep "install usb-storage /bin/(false|true)" /etc/modprobe.conf | grep "usb-storage" | grep -v "#"`
if [ ! "${FIND}" = "" ]; then
FOUND=1
logtext "Result: found usb-storage driver in disabled state"