mirror of https://github.com/CISOfy/lynis.git
Check for OpenSMTPD on all platforms, but only if smtpctl is found
This commit is contained in:
parent
8fccb0e35a
commit
33720a54ac
|
@ -28,7 +28,7 @@
|
|||
POSTFIX_RUNNING=0
|
||||
QMAIL_RUNNING=0
|
||||
SENDMAIL_RUNNING=0
|
||||
SMTPD_RUNNING=0
|
||||
OPENSMTPD_RUNNING=0
|
||||
#
|
||||
#################################################################################
|
||||
#
|
||||
|
@ -221,19 +221,20 @@
|
|||
#################################################################################
|
||||
#
|
||||
# Test : MAIL-8920
|
||||
# Description : Check OpenBSD smtpd process status
|
||||
Register --test-no MAIL-8920 --os OpenBSD --weight L --network NO --description "Check smtpd status"
|
||||
# Description : Check OpenSMTPD process status
|
||||
if [ ! "${SMTPCTL_BINARY}" = "" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
|
||||
Register --test-no MAIL-8920 --preqs-met ${PREQS_MET} --weight L --network NO --description "Check OpenSMTPD status"
|
||||
if [ ${SKIPTEST} -eq 0 ]; then
|
||||
logtext "Test: check smtpd status"
|
||||
FIND=`${PSBINARY} ax | grep "/smtpd" | grep -v "grep"`
|
||||
if [ ! "${FIND}" = "" ]; then
|
||||
logtext "Result: found running smtpd process"
|
||||
Display --indent 2 --text "- Checking OpenBSD smtpd status" --result RUNNING --color GREEN
|
||||
SMTPD_RUNNING=1
|
||||
SMTP_DAEMON="smtpd"
|
||||
Display --indent 2 --text "- Checking OpenSMTPD status" --result RUNNING --color GREEN
|
||||
OPENSMTPD_RUNNING=1
|
||||
SMTP_DAEMON="opensmtpd"
|
||||
else
|
||||
logtext "Result: smtpd not found"
|
||||
Display --indent 2 --text "- Checking OpenBSD smtpd status" --result "NOT FOUND" --color WHITE
|
||||
Display --indent 2 --text "- Checking OpenSMTPD status" --result "NOT FOUND" --color WHITE
|
||||
fi
|
||||
fi
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue