mirror of
https://github.com/hardenedlinux/harbian-audit.git
synced 2025-07-28 08:04:57 +02:00
Fix #42: 14.1 grep returns line format that will never match the regex filter applied
This commit is contained in:
parent
07f7f86612
commit
881c51608e
@ -1314,7 +1314,7 @@ check_sshd_conf_for_one_value_runtime ()
|
|||||||
check_blacklist_module_set ()
|
check_blacklist_module_set ()
|
||||||
{
|
{
|
||||||
MODPROBE_CONF_FILE_PATTERN="/etc/modprobe.d/*"
|
MODPROBE_CONF_FILE_PATTERN="/etc/modprobe.d/*"
|
||||||
COUNT=$(grep -w $1 -r $MODPROBE_CONF_FILE_PATTERN | grep "^blacklist" | wc -l)
|
COUNT=$(grep -hw $1 -r $MODPROBE_CONF_FILE_PATTERN | sed -e 's/^[ ]*//g' |grep "^blacklist" | wc -l)
|
||||||
if [ $COUNT -ge 1 ]; then
|
if [ $COUNT -ge 1 ]; then
|
||||||
debug "$1 has set in $MODPROBE_CONF_FILE_PATTERN"
|
debug "$1 has set in $MODPROBE_CONF_FILE_PATTERN"
|
||||||
FNRET=0
|
FNRET=0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user