mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-23 22:04:39 +02:00
Check if Linux config file is set, before executing other tests
This commit is contained in:
parent
c8189d05e8
commit
9f1f006005
@ -64,7 +64,8 @@
|
|||||||
# If we have a kernel configuration file, use it for testing
|
# If we have a kernel configuration file, use it for testing
|
||||||
# Do not perform test if we already found it in kernel module list, to avoid triggered it in the upcoming
|
# Do not perform test if we already found it in kernel module list, to avoid triggered it in the upcoming
|
||||||
# tests, when using iptables --list
|
# tests, when using iptables --list
|
||||||
if [ ! "${LINUXCONFIGFILE}" = "" -a -f ${LINUXCONFIGFILE} -a ${IPTABLES_MODULE_ACTIVE} -eq 0 ]; then
|
if [ ! "${LINUXCONFIGFILE}" = "" ]; then
|
||||||
|
if [ -f ${LINUXCONFIGFILE} -a ${IPTABLES_MODULE_ACTIVE} -eq 0 ]; then
|
||||||
logtext "Result: found kernel configuration file (${LINUXCONFIGFILE})"
|
logtext "Result: found kernel configuration file (${LINUXCONFIGFILE})"
|
||||||
FIND=`${tCATCMD} ${LINUXCONFIGFILE} | grep -v '^#' | grep "CONFIG_IP_NF_IPTABLES" | head -n 1`
|
FIND=`${tCATCMD} ${LINUXCONFIGFILE} | grep -v '^#' | grep "CONFIG_IP_NF_IPTABLES" | head -n 1`
|
||||||
if [ ! "${FIND}" = "" ]; then
|
if [ ! "${FIND}" = "" ]; then
|
||||||
@ -88,6 +89,7 @@
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
#
|
#
|
||||||
#################################################################################
|
#################################################################################
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user