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>2017-02-22 17:06:19 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2017-02-22 17:06:19 +0300
commitb2f13a2f92716cd1e917d7ad00082f38f91e268d (patch)
tree3a0c5691b81b07a9b4547d54a73c626688e1e359
parent18039ed453380487ff27bd08f256417177afbd15 (diff)
[TIME-3148] new test for TZ variable
-rw-r--r--db/tests.db1
-rw-r--r--include/tests_time28
2 files changed, 20 insertions, 9 deletions
diff --git a/db/tests.db b/db/tests.db
index 5cccb882..a245de54 100644
--- a/db/tests.db
+++ b/db/tests.db
@@ -384,6 +384,7 @@ TIME-3128:test:security:time::Check preffered time source:
TIME-3132:test:security:time::Check NTP falsetickers:
TIME-3136:test:security:time:Linux:Check NTP protocol version:
#TIME-3146:test:security:time:Linux:Check /etc/default/ntpdate:
+TIME-3148:test:performance:time:Linux:Check TZ variable:
TIME-3160:test:security:time:Linux:Check empty NTP step-tickers:
TIME-3170:test:security:time::Check configuration files:
TOOL-5002:test:security:tooling::Checking for automation tools:
diff --git a/include/tests_time b/include/tests_time
index ee53deb2..cab4db0c 100644
--- a/include/tests_time
+++ b/include/tests_time
@@ -401,6 +401,18 @@
#
#################################################################################
#
+ # Test : TIME-3148
+ # Description : Check if TZ variable is set (Linux)
+ # Notes : without TZ variable set, a lot of unneeded calls might be performed.
+ Register --test-no TIME-3148 --os Linux --weight L --network NO --category performance --description "Check TZ variable"
+ if [ ${SKIPTEST} -eq 0 ]; then
+ if [ -z "${TZ}" ]; then
+ Report "tz_variable_empty=1"
+ fi
+ fi
+#
+#################################################################################
+#
# Test : TIME-3160
# Description : Check empty NTP step-tickers
# Notes : Mostly applies to Red Hat and clones
@@ -413,7 +425,7 @@
if [ -z ${FILE} ]; then
LogText "Result: ${FILE} is empty. The step-tickers contain no configured NTP servers"
Display --indent 2 --text "- Checking NTP step-tickers file" --result "EMPTY FILE" --color YELLOW
- ReportSuggestion ${TEST_NO} "Use step-rickers file for quicker time synchronization"
+ ReportSuggestion ${TEST_NO} "Use step-tickers file for quicker time synchronization"
else
LogText "Result: /etc/ntp/step-tickers is not empty, which is fine"
Display --indent 2 --text "- Checking NTP step-tickers file" --result "${STATUS_OK}" --color GREEN
@@ -446,14 +458,6 @@
#
#################################################################################
#
-# For VMs check ntpd.conf : tinker panic 0
-#
-
-WaitForKeyPress
-
-#
-#################################################################################
-#
# Test : TIME-3170
# Description : Check file permissions and ownership of configuration files
# Notes : Files should be owned by root, or the user running
@@ -486,6 +490,10 @@ WaitForKeyPress
#
#################################################################################
#
+
+# For VMs check ntpd.conf : tinker panic 0
+
+
# OS Time daemons Configuration file
# --------------------------------------------
# AIX xntpd /etc/ntp.conf
@@ -495,6 +503,8 @@ WaitForKeyPress
# OpenBSD ntpd /etc/ntpd.conf
# Solaris xntpd /etc/inet/ntp.conf
+WaitForKeyPress
+
#
#================================================================================
# Lynis - Security Auditing and System Hardening for Linux and UNIX - https://cisofy.com