mirror of
https://github.com/CISOfy/lynis.git
synced 2025-09-22 17:38:22 +02:00
Do not check for klogd when systemd-journal is being used
This commit is contained in:
parent
19cf98dd82
commit
b25fa10b1d
@ -171,14 +171,14 @@
|
|||||||
#
|
#
|
||||||
# Test : LOGG-2138
|
# Test : LOGG-2138
|
||||||
# Description : Check for kernel log daemon (klogd) presence on Linux systems
|
# Description : Check for kernel log daemon (klogd) presence on Linux systems
|
||||||
# Notes : When using rsyslog, this process is not needed. In combination
|
# Notes : * When using rsyslog or systemd (systemd-journal), this process is not needed.
|
||||||
# with syslog-ng, klogd is still an addition to it, since it
|
# * In combination with syslog-ng, klogd is still an addition to it, since it
|
||||||
# captures kernel related events and send them to syslog-ng.
|
# captures kernel related events and send them to syslog-ng.
|
||||||
# This test should be below all other logging daemons
|
# * This test should be below all other logging daemons
|
||||||
Register --test-no LOGG-2138 --os Linux --weight L --network NO --description "Checking kernel logger daemon on Linux"
|
Register --test-no LOGG-2138 --os Linux --weight L --network NO --description "Checking kernel logger daemon on Linux"
|
||||||
if [ ${SKIPTEST} -eq 0 ]; then
|
if [ ${SKIPTEST} -eq 0 ]; then
|
||||||
logtext "Test: Searching kernel logger daemon (klogd)"
|
logtext "Test: Searching kernel logger daemon (klogd)"
|
||||||
if [ ${RSYSLOG_RUNNING} -eq 0 ]; then
|
if [ ${RSYSLOG_RUNNING} -eq 0 -a ${SYSTEMD_JOURNAL_RUNNING} -eq 0 ]; then
|
||||||
# Search for klogd, but ignore other lines related to klogd (like dd with input/output file)
|
# Search for klogd, but ignore other lines related to klogd (like dd with input/output file)
|
||||||
#FIND=`${PSBINARY} ax | grep "klogd" | grep -v "dd" | grep -v "grep"`
|
#FIND=`${PSBINARY} ax | grep "klogd" | grep -v "dd" | grep -v "grep"`
|
||||||
IsRunning klogd
|
IsRunning klogd
|
||||||
@ -189,10 +189,9 @@
|
|||||||
logtext "Result: No klogd found"
|
logtext "Result: No klogd found"
|
||||||
Display --indent 4 --text "- Checking klogd" --result "NOT FOUND" --color RED
|
Display --indent 4 --text "- Checking klogd" --result "NOT FOUND" --color RED
|
||||||
ReportWarning ${TEST_NO} "L" "klogd is not running, which could lead to missing kernel messages in log files"
|
ReportWarning ${TEST_NO} "L" "klogd is not running, which could lead to missing kernel messages in log files"
|
||||||
ReportSuggestion ${TEST_NO} "Check why klogd is not running"
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
logtext "Result: test skipped, because rsyslogd is being used"
|
logtext "Result: test skipped, because other facility is being used to log kernel messages"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user