mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-29 00:34:14 +02:00
Change pf firewall detection
This commit is contained in:
parent
e21e8679e0
commit
7ad2dd5480
@ -146,7 +146,7 @@
|
|||||||
|
|
||||||
# Check status with pfctl
|
# Check status with pfctl
|
||||||
logtext "Test: checking pf status via pfctl"
|
logtext "Test: checking pf status via pfctl"
|
||||||
if [ ! "${PFCTLBINARY}" = "" -a -f /dev/pf ]; then
|
if [ ! "${PFCTLBINARY}" = "" ]; then
|
||||||
FIND=`${PFCTLBINARY} -sa 2>&1 | grep "^Status" | head -1 | awk '{ print $2 }'`
|
FIND=`${PFCTLBINARY} -sa 2>&1 | grep "^Status" | head -1 | awk '{ print $2 }'`
|
||||||
if [ "${FIND}" = "Enabled" ]; then
|
if [ "${FIND}" = "Enabled" ]; then
|
||||||
Display --indent 2 --text "- Checking pf status (pfctl)" --result ENABLED --color GREEN
|
Display --indent 2 --text "- Checking pf status (pfctl)" --result ENABLED --color GREEN
|
||||||
@ -166,7 +166,7 @@
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# If we didn't find the status to be enabled, stop searching
|
# If we didn't find the status to be enabled, stop searching
|
||||||
if [ ${PFFOUND} -eq 1 ]; then
|
if [ ${PFFOUND} -eq 0 ]; then
|
||||||
# Check for pf kernel module (FreeBSD and similar)
|
# Check for pf kernel module (FreeBSD and similar)
|
||||||
logtext "Test: searching for pf kernel module"
|
logtext "Test: searching for pf kernel module"
|
||||||
if [ ! "${KLDSTATBINARY}" = "" ]; then
|
if [ ! "${KLDSTATBINARY}" = "" ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user