mirror of https://github.com/CISOfy/lynis.git
Check if hostname is set for NAME-4404 and NAME-4404 tests
This commit is contained in:
parent
40e93c9b45
commit
3802a934c6
|
@ -561,7 +561,8 @@
|
||||||
#
|
#
|
||||||
# Test : NAME-4404
|
# Test : NAME-4404
|
||||||
# Description : Check /etc/hosts contains an entry for this server name
|
# Description : Check /etc/hosts contains an entry for this server name
|
||||||
Register --test-no NAME-4404 --weight L --network NO --description "Check /etc/hosts contains an entry for this server name"
|
if [ ! "${HOSTNAME}" = "" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
|
||||||
|
Register --test-no NAME-4404 --preqs-met ${PREQS_MET} --weight L --network NO --description "Check /etc/hosts contains an entry for this server name"
|
||||||
if [ ${SKIPTEST} -eq 0 ]; then
|
if [ ${SKIPTEST} -eq 0 ]; then
|
||||||
logtext "Test: Check /etc/hosts contains an entry for this server name"
|
logtext "Test: Check /etc/hosts contains an entry for this server name"
|
||||||
if [ -f /etc/hosts ]; then
|
if [ -f /etc/hosts ]; then
|
||||||
|
@ -582,7 +583,8 @@
|
||||||
#
|
#
|
||||||
# Test : NAME-4406
|
# Test : NAME-4406
|
||||||
# Description : Check server hostname mapping
|
# Description : Check server hostname mapping
|
||||||
Register --test-no NAME-4406 --weight L --network NO --description "Check server hostname mapping"
|
if [ ! "${HOSTNAME}" = "" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
|
||||||
|
Register --test-no NAME-4406 --preqs-met ${PREQS_MET} --weight L --network NO --description "Check server hostname mapping"
|
||||||
if [ ${SKIPTEST} -eq 0 ]; then
|
if [ ${SKIPTEST} -eq 0 ]; then
|
||||||
logtext "Test: Check server hostname not locally mapped in /etc/hosts"
|
logtext "Test: Check server hostname not locally mapped in /etc/hosts"
|
||||||
sFIND=`cat /etc/hosts | egrep -v '^(#|$)' | egrep '(localhost|::1)' | grep ${HOSTNAME}`
|
sFIND=`cat /etc/hosts | egrep -v '^(#|$)' | egrep '(localhost|::1)' | grep ${HOSTNAME}`
|
||||||
|
|
Loading…
Reference in New Issue