mirror of https://github.com/CISOfy/lynis.git
Small code enhancements
This commit is contained in:
parent
2e7c6c7816
commit
455fc26bf7
|
@ -35,7 +35,7 @@
|
|||
Register --test-no FINT-4310 --weight L --network NO --category security --description "AFICK availability"
|
||||
if [ ${SKIPTEST} -eq 0 ]; then
|
||||
LogText "Test: Checking AFICK binary"
|
||||
if [ ! -z "${AFICKBINARY}" ]; then
|
||||
if [ -n "${AFICKBINARY}" ]; then
|
||||
LogText "Result: AFICK is installed (${AFICKBINARY})"
|
||||
Report "file_integrity_tool[]=afick"
|
||||
FILE_INT_TOOL="afick"
|
||||
|
@ -54,7 +54,7 @@
|
|||
Register --test-no FINT-4314 --weight L --network NO --category security --description "AIDE availability"
|
||||
if [ ${SKIPTEST} -eq 0 ]; then
|
||||
LogText "Test: Checking AIDE binary"
|
||||
if [ ! -z "${AIDEBINARY}" ]; then
|
||||
if [ -n "${AIDEBINARY}" ]; then
|
||||
LogText "Result: AIDE is installed (${AIDEBINARY})"
|
||||
Report "file_integrity_tool[]=aide"
|
||||
FILE_INT_TOOL="aide"
|
||||
|
@ -73,10 +73,10 @@
|
|||
if [ ! -z "${AIDEBINARY}" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
|
||||
Register --test-no FINT-4315 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Check AIDE configuration file"
|
||||
if [ ${SKIPTEST} -eq 0 ]; then
|
||||
AIDE_CONFIG_LOCS="/etc /etc/aide /usr/local/etc"
|
||||
AIDE_CONFIG_LOCS="${ROOTDIR}etc ${ROOTDIR}etc/aide ${ROOTDIR}usr/local/etc"
|
||||
LogText "Test: search for aide.conf in ${AIDE_CONFIG_LOCS}"
|
||||
for I in ${AIDE_CONFIG_LOCS}; do
|
||||
if [ -f ${I}/aide.conf ]; then
|
||||
if [ -f "${I}/aide.conf" ]; then
|
||||
LogText "Result: found aide.conf in directory ${I}"
|
||||
AIDECONFIG="${I}/aide.conf"
|
||||
fi
|
||||
|
@ -181,7 +181,7 @@
|
|||
Register --test-no FINT-4330 --weight L --network NO --category security --description "mtree availability"
|
||||
if [ ${SKIPTEST} -eq 0 ]; then
|
||||
LogText "Test: Checking mtree binary"
|
||||
if [ ! -z "${MTREEBINARY}" ]; then
|
||||
if [ -n "${MTREEBINARY}" ]; then
|
||||
LogText "Result: mtree is installed (${MTREEBINARY})"
|
||||
Report "file_integrity_tool[]=mtree"
|
||||
FILE_INT_TOOL="mtree"
|
||||
|
@ -201,8 +201,7 @@
|
|||
Register --test-no FINT-4334 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Check lfd daemon status"
|
||||
if [ ${SKIPTEST} -eq 0 ]; then
|
||||
Display --indent 4 --text "- lfd (CSF)" --result "${STATUS_FOUND}" --color GREEN
|
||||
IsRunning 'lfd '
|
||||
if [ ${RUNNING} -eq 1 ]; then
|
||||
if IsRunning 'lfd '; then
|
||||
LogText "Result: lfd daemon is running (CSF)"
|
||||
Report "file_integrity_tool[]=csf-lfd"
|
||||
Display --indent 6 --text "- LFD (CSF) daemon" --result "${STATUS_RUNNING}" --color GREEN
|
||||
|
@ -222,7 +221,7 @@
|
|||
if [ ${SKIPTEST} -eq 0 ]; then
|
||||
# LFD configuration parameters
|
||||
ENABLED=$(${GREPBINARY} "^LF_DAEMON = \"1\"" ${CSF_CONFIG})
|
||||
if [ ! -z "${ENABLED}" ]; then
|
||||
if [ -n "${ENABLED}" ]; then
|
||||
LogText "Result: lfd service is configured to run"
|
||||
Display --indent 6 --text "- Configuration status" --result "${STATUS_ENABLED}" --color GREEN
|
||||
else
|
||||
|
@ -252,8 +251,7 @@
|
|||
Register --test-no FINT-4338 --weight L --network NO --category security --description "osqueryd syscheck daemon running"
|
||||
if [ ${SKIPTEST} -eq 0 ]; then
|
||||
LogText "Test: Checking if osqueryd syscheck daemon is running"
|
||||
IsRunning osqueryd
|
||||
if [ ${RUNNING} -eq 1 ]; then
|
||||
if IsRunning "osqueryd"; then
|
||||
LogText "Result: syscheck (osquery) installed"
|
||||
Report "file_integrity_tool[]=osquery"
|
||||
FILE_INT_TOOL="osquery"
|
||||
|
|
Loading…
Reference in New Issue