Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Boelen <michael.boelen@cisofy.com>2016-06-18 12:14:01 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2016-06-18 12:14:01 +0300
commit983e293eb157131ca5e085e4927ea5fc220edc73 (patch)
treecc5e8bea4af5cfa53f57a73d2c61357f47165857 /include/tests_logging
parent9c093f7a97fb0b9593a303ef7394c3bc5dea99b2 (diff)
Replaced text strings to allow translations
Diffstat (limited to 'include/tests_logging')
-rw-r--r--include/tests_logging60
1 files changed, 30 insertions, 30 deletions
diff --git a/include/tests_logging b/include/tests_logging
index dfd63679..37f3eeb6 100644
--- a/include/tests_logging
+++ b/include/tests_logging
@@ -45,13 +45,13 @@
LogText "Test: Searching for a logging daemon"
FIND=`${PSBINARY} ax | egrep "syslogd|syslog-ng|metalog|systemd-journal" | grep -v "grep"`
if [ "${FIND}" = "" ]; then
- Display --indent 2 --text "- Checking for a running log daemon" --result WARNING --color RED
+ Display --indent 2 --text "- Checking for a running log daemon" --result "${STATUS_WARNING}" --color RED
LogText "Result: Could not find a syslog daemon like syslog, syslog-ng, rsyslog, metalog, systemd-journal"
ReportSuggestion ${TEST_NO} "Check if any syslog daemon is running and correctly configured."
ReportWarning ${TEST_NO} "H" "No syslog daemon found"
AddHP 0 3
else
- Display --indent 2 --text "- Checking for a running log daemon" --result OK --color GREEN
+ Display --indent 2 --text "- Checking for a running log daemon" --result "${STATUS_OK}" --color GREEN
LogText "Result: Found a logging daemon"
SYSLOG_DAEMON_PRESENT=1
SYSLOG_DAEMON_RUNNING=1
@@ -69,12 +69,12 @@
IsRunning syslog-ng
if [ ${RUNNING} -eq 1 ]; then
LogText "Result: Found syslog-ng in process list"
- Display --indent 4 --text "- Checking Syslog-NG status" --result FOUND --color GREEN
+ Display --indent 4 --text "- Checking Syslog-NG status" --result "${STATUS_FOUND}" --color GREEN
SYSLOG_DAEMON_PRESENT=1
SYSLOG_NG_RUNNING=1
else
LogText "Result: Syslog-ng NOT found in process list"
- Display --indent 4 --text "- Checking Syslog-NG status" --result "NOT FOUND" --color WHITE
+ Display --indent 4 --text "- Checking Syslog-NG status" --result "${STATUS_NOT_FOUND}" --color WHITE
fi
fi
#
@@ -88,10 +88,10 @@
FIND=`${SYSLOGNGBINARY} -s; echo $?`
if [ "${FIND}" = "0" ]; then
LogText "Result: Syslog-NG configuration file seems to be consistent"
- Display --indent 6 --text "- Checking Syslog-NG consistency" --result OK --color GREEN
+ Display --indent 6 --text "- Checking Syslog-NG consistency" --result "${STATUS_OK}" --color GREEN
else
LogText "Result: Syslog-NG configuration file seems NOT to be consistent"
- Display --indent 6 --text "- Checking Syslog-NG consistency" --result WARNING --color RED
+ Display --indent 6 --text "- Checking Syslog-NG consistency" --result "${STATUS_WARNING}" --color RED
ReportWarning ${TEST_NO} "L" "Found one or more problems in Syslog-NG configuration file"
ReportSuggestion ${TEST_NO} "Check the Syslog-NG configuration file and/or run a manual consistency check with: syslog-ng -s"
fi
@@ -106,10 +106,10 @@
LogText "Test: Searching for systemd journal daemon in process list"
IsRunning systemd-journal
if [ ${RUNNING} -eq 1 ]; then
- Display --indent 4 --text "- Checking systemd journal status" --result FOUND --color GREEN
+ Display --indent 4 --text "- Checking systemd journal status" --result "${STATUS_FOUND}" --color GREEN
SYSTEMD_JOURNAL_RUNNING=1
else
- Display --indent 4 --text "- Checking systemd journal status" --result "NOT FOUND" --color WHITE
+ Display --indent 4 --text "- Checking systemd journal status" --result "${STATUS_NOT_FOUND}" --color WHITE
fi
fi
#
@@ -123,12 +123,12 @@
IsRunning metalog
if [ ${RUNNING} -eq 1 ]; then
LogText "Result: Found metalog in process list"
- Display --indent 4 --text "- Checking Metalog status" --result FOUND --color GREEN
+ Display --indent 4 --text "- Checking Metalog status" --result "${STATUS_FOUND}" --color GREEN
SYSLOG_DAEMON_PRESENT=1
METALOG_RUNNING=1
else
LogText "Result: metalog NOT found in process list"
- Display --indent 4 --text "- Checking Metalog status" --result "NOT FOUND" --color WHITE
+ Display --indent 4 --text "- Checking Metalog status" --result "${STATUS_NOT_FOUND}" --color WHITE
fi
fi
#
@@ -142,12 +142,12 @@
IsRunning rsyslogd
if [ ${RUNNING} -eq 1 ]; then
LogText "Result: Found rsyslogd in process list"
- Display --indent 4 --text "- Checking RSyslog status" --result FOUND --color GREEN
+ Display --indent 4 --text "- Checking RSyslog status" --result "${STATUS_FOUND}" --color GREEN
SYSLOG_DAEMON_PRESENT=1
RSYSLOG_RUNNING=1
else
LogText "Result: rsyslogd NOT found in process list"
- Display --indent 4 --text "- Checking RSyslog status" --result "NOT FOUND" --color WHITE
+ Display --indent 4 --text "- Checking RSyslog status" --result "${STATUS_NOT_FOUND}" --color WHITE
fi
fi
#
@@ -161,12 +161,12 @@
IsRunning rfc3195d
if [ ${RUNNING} -eq 1 ]; then
LogText "Result: Found rfc3195d in process list"
- Display --indent 4 --text "- Checking RFC 3195 daemon status" --result FOUND --color GREEN
+ Display --indent 4 --text "- Checking RFC 3195 daemon status" --result "${STATUS_FOUND}" --color GREEN
SYSLOG_DAEMON_PRESENT=1
RFC3195D_RUNNING=1
else
LogText "Result: rfc3195d NOT found in process list"
- Display --indent 4 --text "- Checking RFC 3195 daemon status" --result "NOT FOUND" --color WHITE
+ Display --indent 4 --text "- Checking RFC 3195 daemon status" --result "${STATUS_NOT_FOUND}" --color WHITE
fi
fi
#
@@ -187,10 +187,10 @@
IsRunning klogd
if [ ${RUNNING} -eq 1 ]; then
LogText "Result: klogd running"
- Display --indent 4 --text "- Checking klogd" --result FOUND --color GREEN
+ Display --indent 4 --text "- Checking klogd" --result "${STATUS_FOUND}" --color GREEN
else
LogText "Result: No klogd found"
- Display --indent 4 --text "- Checking klogd" --result "NOT FOUND" --color RED
+ Display --indent 4 --text "- Checking klogd" --result "${STATUS_NOT_FOUND}" --color RED
ReportWarning ${TEST_NO} "L" "klogd is not running, which could lead to missing kernel messages in log files"
fi
else
@@ -208,10 +208,10 @@
# Search for minilogd. It shouldn't be running normally, if another syslog daemon is started
IsRunning minilogd
if [ ${RUNNING} -eq 0 ]; then
- Display --indent 4 --text "- Checking minilogd instances" --result "NOT FOUND" --color WHITE
+ Display --indent 4 --text "- Checking minilogd instances" --result "${STATUS_NOT_FOUND}" --color WHITE
LogText "Result: No minilogd is running"
else
- Display --indent 4 --text "- Checking minilogd instances" --result WARNING --color RED
+ Display --indent 4 --text "- Checking minilogd instances" --result "${STATUS_WARNING}" --color RED
LogText "Result: minilogd found in process list"
# minilogd daemon seems to be running
ReportWarning ${TEST_NO} "L" "minilogd is running, which should normally not be running"
@@ -241,10 +241,10 @@
LogText "Result: /etc/logrotate.conf found"
fi
if [ ${LOGROTATE_CONFIG_FOUND} -eq 1 ]; then
- Display --indent 2 --text "- Checking logrotate presence" --result OK --color GREEN
+ Display --indent 2 --text "- Checking logrotate presence" --result "${STATUS_OK}" --color GREEN
LogText "Result: logrotate configuration found"
else
- Display --indent 2 --text "- Checking logrotate presence" --result WARNING --color RED
+ Display --indent 2 --text "- Checking logrotate presence" --result "${STATUS_WARNING}" --color RED
LogText "Result: No logrotate configuration found"
ReportSuggestion ${TEST_NO} "Check if files are properly rotated by a some tool instead of logrotate"
fi
@@ -323,9 +323,9 @@
if [ ${SOLARIS_LOGHOST_FOUND} -eq 1 ]; then
LogText "Result: loghost entry found and most likely used to send syslog messages"
- Display --indent 2 --text "- Checking loghost entry" --result OK --color GREEN
+ Display --indent 2 --text "- Checking loghost entry" --result "${STATUS_OK}" --color GREEN
else
- Display --indent 2 --text "- Checking loghost entry" --result WARNING --color RED
+ Display --indent 2 --text "- Checking loghost entry" --result "${STATUS_WARNING}" --color RED
LogText "Result: No loghost entry found"
ReportWarning ${TEST_NO} "L" "No loghost entry found"
ReportSuggestion ${TEST_NO} "Add a loghost entry to /etc/inet/hosts or other name services"
@@ -369,7 +369,7 @@
Display --indent 2 --text "- Checking remote logging" --result "NOT ENABLED" --color YELLOW
else
AddHP 5 5
- Display --indent 2 --text "- Checking remote logging" --result ENABLED --color GREEN
+ Display --indent 2 --text "- Checking remote logging" --result "${STATUS_ENABLED}" --color GREEN
fi
else
LogText "Result: test skipped, file ${SYSLOGD_CONF} not found"
@@ -384,7 +384,7 @@
Register --test-no LOGG-2160 --preqs-met ${PREQS_MET} --weight L --network NO --description "Checking /etc/newsyslog.conf"
if [ ${SKIPTEST} -eq 0 ]; then
LogText "Result: /etc/newsyslog.conf found"
- Display --indent 2 --text "- Checking /etc/newsyslog.conf" --result FOUND --color GREEN
+ Display --indent 2 --text "- Checking /etc/newsyslog.conf" --result "${STATUS_FOUND}" --color GREEN
LOGROTATE_CONFIG_FOUND=1
LOGROTATE_TOOL="newsyslog"
fi
@@ -406,7 +406,7 @@
LogText "Result: Item ${I} is not a directory"
fi
done
- Display --indent 4 --text "- Checking log directories (newsyslog.conf)" --result DONE --color GREEN
+ Display --indent 4 --text "- Checking log directories (newsyslog.conf)" --result "${STATUS_DONE}" --color GREEN
fi
#
#################################################################################
@@ -425,7 +425,7 @@
LogText "Result: Item ${I} is not a file"
fi
done
- Display --indent 4 --text "- Checking log files (newsyslog.conf)" --result DONE --color GREEN
+ Display --indent 4 --text "- Checking log files (newsyslog.conf)" --result "${STATUS_DONE}" --color GREEN
fi
#
#################################################################################
@@ -443,7 +443,7 @@
LogText "Result: directory ${I} can't be found"
fi
done
- Display --indent 2 --text "- Checking log directories (static list)" --result DONE --color GREEN
+ Display --indent 2 --text "- Checking log directories (static list)" --result "${STATUS_DONE}" --color GREEN
fi
#
#################################################################################
@@ -459,10 +459,10 @@
LogText "Found logfile: ${I}"
Report "open_logfile[]=${I}"
done
- Display --indent 2 --text "- Checking open log files" --result DONE --color GREEN
+ Display --indent 2 --text "- Checking open log files" --result "${STATUS_DONE}" --color GREEN
else
LogText "Result: lsof not installed, skipping test"
- Display --indent 2 --text "- Checking open log files" --result SKIPPED --color YELLOW
+ Display --indent 2 --text "- Checking open log files" --result "${STATUS_SKIPPED}" --color YELLOW
# Add suggestion
fi
fi
@@ -497,7 +497,7 @@
ReportSuggestion ${TEST_NO} "Check what deleted files are still in use and why."
else
LogText "Result: no deleted files found"
- Display --indent 2 --text "- Checking deleted files in use" --result DONE --color GREEN
+ Display --indent 2 --text "- Checking deleted files in use" --result "${STATUS_DONE}" --color GREEN
fi
fi
#