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_nameservices
parent9c093f7a97fb0b9593a303ef7394c3bc5dea99b2 (diff)
Replaced text strings to allow translations
Diffstat (limited to 'include/tests_nameservices')
-rw-r--r--include/tests_nameservices86
1 files changed, 43 insertions, 43 deletions
diff --git a/include/tests_nameservices b/include/tests_nameservices
index 50bb1a39..2eeb33ec 100644
--- a/include/tests_nameservices
+++ b/include/tests_nameservices
@@ -49,12 +49,12 @@
FIND=`awk '/^domain/ { print $2 }' /etc/resolv.conf`
if [ "${FIND}" = "" ]; then
LogText "Result: no default domain found"
- if IsVerbose; then Display --indent 2 --text "- Checking default DNS search domain" --result NONE --color WHITE; fi
+ if IsVerbose; then Display --indent 2 --text "- Checking default DNS search domain" --result "${STATUS_NONE}" --color WHITE; fi
else
LogText "Result: found default domain"
LogText "Output: ${FIND}"
Report "resolv_conf_domain=${FIND}"
- Display --indent 2 --text "- Checking default DNS search domain" --result FOUND --color GREEN
+ Display --indent 2 --text "- Checking default DNS search domain" --result "${STATUS_FOUND}" --color GREEN
RESOLV_DOMAINNAME="${FIND}"
fi
fi
@@ -83,16 +83,16 @@
# Warn if we have more than 6 search domains, which is maximum in most resolvers
if [ ${N} -gt 6 ]; then
LogText "Result: Found ${N} search domains"
- Display --indent 2 --text "- Checking search domains" --result WARNING --color YELLOW
+ Display --indent 2 --text "- Checking search domains" --result "${STATUS_WARNING}" --color YELLOW
ReportWarning ${TEST_NO} "L" "Found more than 6 search domains, which is usually more than the maximum allowed number in most resolvers"
else
LogText "Result: Found ${N} search domains"
- Display --indent 2 --text "- Checking search domains" --result FOUND --color GREEN
+ Display --indent 2 --text "- Checking search domains" --result "${STATUS_FOUND}" --color GREEN
fi
fi
else
LogText "Result: /etc/resolv.conf does not exist, skipping test"
- Display --indent 2 --text "- Checking search domains" --result "NOT FOUND" --color YELLOW
+ Display --indent 2 --text "- Checking search domains" --result "${STATUS_NOT_FOUND}" --color YELLOW
fi
# Check amount of search domains (max 1)
@@ -118,7 +118,7 @@
FIND=`grep "^options" /etc/resolv.conf | awk '{ print $2 }'`
if [ "${FIND}" = "" ]; then
LogText "Result: no specific other options configured in /etc/resolv.conf"
- if IsVerbose; then Display --indent 2 --text "- Checking /etc/resolv.conf options" --result "NONE" --color WHITE; fi
+ if IsVerbose; then Display --indent 2 --text "- Checking /etc/resolv.conf options" --result "${STATUS_NONE}" --color WHITE; fi
else
for I in ${FIND}; do
LogText "Found option: ${I}"
@@ -126,11 +126,11 @@
#rotate --> add performance tune point
#timeout <3 --> add performe tune point
done
- Display --indent 2 --text "- Checking /etc/resolv.conf options" --result "FOUND" --color GREEN
+ Display --indent 2 --text "- Checking /etc/resolv.conf options" --result "${STATUS_FOUND}" --color GREEN
fi
else
LogText "Result: /etc/resolv.conf not found, test skipped"
- Display --indent 2 --text "- Checking /etc/resolv.conf options" --result "NOT FOUND" --color YELLOW
+ Display --indent 2 --text "- Checking /etc/resolv.conf options" --result "${STATUS_NOT_FOUND}" --color YELLOW
fi
fi
#
@@ -142,7 +142,7 @@
if [ ${SKIPTEST} -eq 0 ]; then
FIND=`uname -n`
LogText "Result: 'uname -n' returned ${FIND}"
- Display --indent 2 --text "- Checking uname -n output" --result DONE --color GREEN
+ Display --indent 2 --text "- Checking uname -n output" --result "${STATUS_DONE}" --color GREEN
fi
#
#################################################################################
@@ -157,7 +157,7 @@
LogText "Result: file /etc/nodename exists"
FIND=`cat /etc/nodename`
LogText "Output: ${FIND}"
- Display --indent 2 --text "- Checking /etc/nodename" --result "DONE" --color GREEN
+ Display --indent 2 --text "- Checking /etc/nodename" --result "${STATUS_DONE}" --color GREEN
else
LogText "Result: file /etc/nodename could not be found"
Display --indent 2 --text "- Checking /etc/nodename" --result "NONE FOUND" --color YELLOW
@@ -216,10 +216,10 @@
if [ ! "${DOMAINNAME}" = "" ]; then
LogText "Result: found domain name"
Report "domainname=${DOMAINNAME}"
- Display --indent 2 --text "- Searching DNS domain name" --result "FOUND" --color GREEN
+ Display --indent 2 --text "- Searching DNS domain name" --result "${STATUS_FOUND}" --color GREEN
Display --indent 6 --text "Domain name: ${DOMAINNAME}"
else
- Display --indent 2 --text "- Searching DNS domain name" --result "UNKNOWN" --color YELLOW
+ Display --indent 2 --text "- Searching DNS domain name" --result "${STATUS_UNKNOWN}" --color YELLOW
ReportSuggestion ${TEST_NO} "Check DNS configuration for the dns domain name"
fi
fi
@@ -235,10 +235,10 @@
if [ ${RUNNING} -eq 1 ]; then
NAME_CACHE_USED=1
LogText "Result: nscd is running"
- Display --indent 2 --text "- Checking nscd status" --result RUNNING --color GREEN
+ Display --indent 2 --text "- Checking nscd status" --result "${STATUS_RUNNING}" --color GREEN
else
LogText "Result: nscd is not running"
- if IsVerbose; then Display --indent 2 --text "- Checking nscd status" --result "NOT FOUND" --color WHITE; fi
+ if IsVerbose; then Display --indent 2 --text "- Checking nscd status" --result "${STATUS_NOT_FOUND}" --color WHITE; fi
fi
fi
#
@@ -254,10 +254,10 @@
UNBOUND_RUNNING=1
NAME_CACHE_USED=1
LogText "Result: Unbound daemon is running"
- Display --indent 2 --text "- Checking Unbound status" --result RUNNING --color GREEN
+ Display --indent 2 --text "- Checking Unbound status" --result "${STATUS_RUNNING}" --color GREEN
else
LogText "Result: Unbound daemon is not running"
- if IsVerbose; then Display --indent 2 --text "- Checking Unbound status" --result "NOT FOUND" --color WHITE; fi
+ if IsVerbose; then Display --indent 2 --text "- Checking Unbound status" --result "${STATUS_NOT_FOUND}" --color WHITE; fi
fi
fi
#
@@ -276,7 +276,7 @@
if [ $? -eq 0 ]; then
UNBOUND_CONFIG_OK=1
LogText "Result: Configuration is fine"
- Display --indent 2 --text "- Checking configuration file" --result OK --color GREEN
+ Display --indent 2 --text "- Checking configuration file" --result "${STATUS_OK}" --color GREEN
else
LogText "Result: Unbound daemon is not running"
Display --indent 2 --text "- Checking configuration file" --result "NOT OK" --color YELLOW
@@ -297,11 +297,11 @@
IsRunning named
if [ ${RUNNING} -eq 1 ]; then
LogText "Result: found BIND process"
- Display --indent 2 --text "- Checking BIND status" --result "FOUND" --color GREEN
+ Display --indent 2 --text "- Checking BIND status" --result "${STATUS_FOUND}" --color GREEN
BIND_RUNNING=1
else
LogText "Result: BIND not running"
- if IsVerbose; then Display --indent 2 --text "- Checking BIND status" --result "NOT FOUND" --color WHITE; fi
+ if IsVerbose; then Display --indent 2 --text "- Checking BIND status" --result "${STATUS_NOT_FOUND}" --color WHITE; fi
fi
fi
#
@@ -320,9 +320,9 @@
fi
done
if [ ! "${BIND_CONFIG_LOCATION}" = "" ]; then
- Display --indent 4 --text "- Checking BIND configuration file" --result "FOUND" --color GREEN
+ Display --indent 4 --text "- Checking BIND configuration file" --result "${STATUS_FOUND}" --color GREEN
else
- Display --indent 4 --text "- Checking BIND configuration file" --result "NOT FOUND" --color YELLOW
+ Display --indent 4 --text "- Checking BIND configuration file" --result "${STATUS_NOT_FOUND}" --color YELLOW
fi
fi
#
@@ -339,10 +339,10 @@
FIND=`${NAMEDCHECKCONFBINARY} ${BIND_CONFIG_LOCATION}; echo $?`
if [ "${FIND}" = "0" ]; then
LogText "Result: configuration file ${BIND_CONFIG_LOCATION} seems to be fine"
- Display --indent 4 --text "- Checking BIND configuration consistency" --result "OK" --color GREEN
+ Display --indent 4 --text "- Checking BIND configuration consistency" --result "${STATUS_OK}" --color GREEN
else
LogText "Result: possible errors found in ${BIND_CONFIG_LOCATION}"
- Display --indent 4 --text "- Checking BIND configuration consistency" --result WARNING --color RED
+ Display --indent 4 --text "- Checking BIND configuration consistency" --result "${STATUS_WARNING}" --color RED
ReportWarning ${TEST_NO} "Errors discovered in BIND configuration file"
fi
else
@@ -368,11 +368,11 @@
FIND=`${DIGBINARY} @localhost version.bind chaos txt | grep "^version.bind" | grep TXT | egrep "[0-9].[0-9].[0-9]*"`
if [ "${FIND}" = "" ]; then
LogText "Result: no useful information in banner found"
- Display --indent 4 --text "- Checking BIND version in banner" --result "OK" --color GREEN
+ Display --indent 4 --text "- Checking BIND version in banner" --result "${STATUS_OK}" --color GREEN
AddHP 2 2
else
LogText "Result: possible BIND version available in version banner"
- Display --indent 4 --text "- Checking BIND version in banner" --result WARNING --color RED
+ Display --indent 4 --text "- Checking BIND version in banner" --result "${STATUS_WARNING}" --color RED
ReportWarning ${TEST_NO} "M" "Found BIND version in banner"
ReportSuggestion ${TEST_NO} "The version in BIND can be masked by defining 'version none' in the configuration file"
AddHP 0 2
@@ -410,11 +410,11 @@
IsRunning pdns_server
if [ ${RUNNING} -eq 1 ]; then
LogText "Result: found PowerDNS process"
- Display --indent 2 --text "- Checking PowerDNS status" --result "RUNNING" --color GREEN
+ Display --indent 2 --text "- Checking PowerDNS status" --result "${STATUS_RUNNING}" --color GREEN
POWERDNS_RUNNING=1
else
LogText "Result: PowerDNS not running"
- if IsVerbose; then Display --indent 2 --text "- Checking PowerDNS status" --result "NOT FOUND" --color WHITE; fi
+ if IsVerbose; then Display --indent 2 --text "- Checking PowerDNS status" --result "${STATUS_NOT_FOUND}" --color WHITE; fi
fi
fi
#
@@ -433,9 +433,9 @@
fi
done
if [ ! "${POWERDNS_AUTH_CONFIG_LOCATION}" = "" ]; then
- Display --indent 4 --text "- Checking PowerDNS configuration file" --result "FOUND" --color GREEN
+ Display --indent 4 --text "- Checking PowerDNS configuration file" --result "${STATUS_FOUND}" --color GREEN
else
- Display --indent 4 --text "- Checking PowerDNS configuration file" --result "NOT FOUND" --color YELLOW
+ Display --indent 4 --text "- Checking PowerDNS configuration file" --result "${STATUS_NOT_FOUND}" --color YELLOW
fi
fi
#
@@ -461,10 +461,10 @@
for I in ${FIND}; do
LogText "Found backend: ${I}"
done
- Display --indent 4 --text "- Checking PowerDNS backends" --result "FOUND" --color GREEN
+ Display --indent 4 --text "- Checking PowerDNS backends" --result "${STATUS_FOUND}" --color GREEN
else
LogText "Result: no PowerDNS backends found"
- Display --indent 4 --text "- Checking PowerDNS backends" --result "NOT FOUND" --color YELLOW
+ Display --indent 4 --text "- Checking PowerDNS backends" --result "${STATUS_NOT_FOUND}" --color YELLOW
fi
fi
#
@@ -507,18 +507,18 @@
IsRunning ypbind
if [ ${RUNNING} -eq 1 ]; then
LogText "Result: ypbind is running"
- Display --indent 2 --text "- Checking ypbind status" --result "FOUND" --color GREEN
+ Display --indent 2 --text "- Checking ypbind status" --result "${STATUS_FOUND}" --color GREEN
YPBIND_RUNNING=1
IsRunning ypldap
if [ ${RUNNING} -eq 1 ]; then
LogText "Result: ypldap is running"
- Display --indent 2 --text "- Checking ypldap status" --result "FOUND" --color GREEN
+ Display --indent 2 --text "- Checking ypldap status" --result "${STATUS_FOUND}" --color GREEN
else
ReportSuggestion "Disable the usage of NIS/NIS+ and use an alternative like LDAP or Kerberos instead"
fi
else
LogText "Result: ypbind is not active"
- if IsVerbose; then Display --indent 2 --text "- Checking ypbind status" --result "NOT FOUND" --color WHITE; fi
+ if IsVerbose; then Display --indent 2 --text "- Checking ypbind status" --result "${STATUS_NOT_FOUND}" --color WHITE; fi
fi
fi
#
@@ -579,10 +579,10 @@
if [ ! "${NISDOMAIN}" = "" ]; then
LogText "Found NIS domain: ${NISDOMAIN}"
Report "nisdomain=${NISDOMAIN}"
- Display --indent 4 --text "- Checking NIS domain" --result "FOUND" --color GREEN
+ Display --indent 4 --text "- Checking NIS domain" --result "${STATUS_FOUND}" --color GREEN
else
LogText "Result: No NIS domain found"
- Display --indent 4 --text "- Checking NIS domain" --result "UNKNOWN" --color YELLOW
+ Display --indent 4 --text "- Checking NIS domain" --result "${STATUS_UNKNOWN}" --color YELLOW
fi
fi
#
@@ -601,16 +601,16 @@
sFIND=`egrep -v '^(#|$)' /etc/hosts | awk '{ print $1, $2 }' | sort | uniq -d`
if [ "${sFIND}" = "" ]; then
LogText "Result: OK, no duplicate lines found"
- Display --indent 4 --text "- Checking /etc/hosts (duplicates)" --result OK --color GREEN
+ Display --indent 4 --text "- Checking /etc/hosts (duplicates)" --result "${STATUS_OK}" --color GREEN
else
LogText "Found duplicate line: ${sFIND}"
LogText "Result: found duplicate line"
- Display --indent 4 --text "- Checking /etc/hosts (duplicates)" --result SUGGESTION --color YELLOW
+ Display --indent 4 --text "- Checking /etc/hosts (duplicates)" --result "${STATUS_SUGGESTION}" --color YELLOW
ReportSuggestion "${TEST_NO}" "Remove duplicate lines in /etc/hosts"
fi
else
LogText "Result: /etc/hosts not found, test skipped"
- Display --indent 4 --text "Searching duplicate line" --result "SKIPPED" --color YELLOW
+ Display --indent 4 --text "Searching duplicate line" --result "${STATUS_SKIPPED}" --color YELLOW
fi
fi
#
@@ -626,10 +626,10 @@
sFIND=`egrep -v '^(#|$|^::1\s|localhost)' /etc/hosts | grep -i ${HOSTNAME}`
if [ "${sFIND}" != "" ]; then
LogText "Result: Found entry for ${HOSTNAME} in /etc/hosts"
- Display --indent 4 --text "- Checking /etc/hosts (hostname)" --result OK --color GREEN
+ Display --indent 4 --text "- Checking /etc/hosts (hostname)" --result "${STATUS_OK}" --color GREEN
else
LogText "Result: No entry found for ${HOSTNAME} in /etc/hosts"
- Display --indent 4 --text "- Checking /etc/hosts (hostname)" --result SUGGESTION --color YELLOW
+ Display --indent 4 --text "- Checking /etc/hosts (hostname)" --result "${STATUS_SUGGESTION}" --color YELLOW
ReportSuggestion ${TEST_NO} "Add the IP name and FQDN to /etc/hosts for proper name resolving"
LogText "Risk: No entry for the server name [hostname] in /etc/hosts may cause unexpected performance problems for local connections"
fi
@@ -648,12 +648,12 @@
if [ ! "${sFIND}" = "" ]; then
LogText "Result: Found this server hostname mapped to a local address"
LogText "Output: ${sFIND}"
- Display --indent 4 --text "- Checking /etc/hosts (localhost)" --result SUGGESTION --color YELLOW
+ Display --indent 4 --text "- Checking /etc/hosts (localhost)" --result "${STATUS_SUGGESTION}" --color YELLOW
LogText "Information: Linking the hostname to the localhost entry may break some resolving. Split resolving so that localhost resolves back to 127.0.0.1 (and ::1) and the hostname of the machine to the real IP address on the network interface."
ReportSuggestion ${TEST_NO} "Split resolving between localhost and the hostname of the system"
else
LogText "Result: this server hostname is not mapped to a local address"
- Display --indent 4 --text "- Checking /etc/hosts (localhost)" --result OK --color GREEN
+ Display --indent 4 --text "- Checking /etc/hosts (localhost)" --result "${STATUS_OK}" --color GREEN
fi
fi
#