diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2016-06-18 12:14:01 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2016-06-18 12:14:01 +0300 |
commit | 983e293eb157131ca5e085e4927ea5fc220edc73 (patch) | |
tree | cc5e8bea4af5cfa53f57a73d2c61357f47165857 /include/tests_accounting | |
parent | 9c093f7a97fb0b9593a303ef7394c3bc5dea99b2 (diff) |
Replaced text strings to allow translations
Diffstat (limited to 'include/tests_accounting')
-rw-r--r-- | include/tests_accounting | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/include/tests_accounting b/include/tests_accounting index 0c0ba8bb..22cbd4eb 100644 --- a/include/tests_accounting +++ b/include/tests_accounting @@ -35,11 +35,11 @@ Register --test-no ACCT-2754 --os FreeBSD --weight L --network NO --description "Check for available FreeBSD accounting information" if [ ${SKIPTEST} -eq 0 ]; then if [ -f /var/account/acct ]; then - Display --indent 2 --text "- Checking accounting information" --result OK --color GREEN + Display --indent 2 --text "- Checking accounting information" --result "${STATUS_OK}" --color GREEN LogText "Result: /var/account/acct available" AddHP 3 3 else - Display --indent 2 --text "- Checking accounting information" --result "NOT FOUND" --color YELLOW + Display --indent 2 --text "- Checking accounting information" --result "${STATUS_NOT_FOUND}" --color YELLOW LogText "Result: No accounting information available" LogText "Remark: Possibly there is another location where the accounting data is stored" ReportSuggestion ${TEST_NO} "Enable process accounting" @@ -54,11 +54,11 @@ Register --test-no ACCT-2760 --os OpenBSD --weight L --network NO --description "Check for available OpenBSD accounting information" if [ ${SKIPTEST} -eq 0 ]; then if [ -f /var/account/acct ]; then - Display --indent 2 --text "- Checking accounting information" --result OK --color GREEN + Display --indent 2 --text "- Checking accounting information" --result "${STATUS_OK}" --color GREEN LogText "Result: /var/account/acct available" AddHP 3 3 else - Display --indent 2 --text "- Checking accounting information" --result "NOT FOUND" --color YELLOW + Display --indent 2 --text "- Checking accounting information" --result "${STATUS_NOT_FOUND}" --color YELLOW LogText "Result: No accounting information available" LogText "Remark: Possibly there is another location where the accounting data is stored" ReportSuggestion ${TEST_NO} "Enable process accounting" @@ -75,19 +75,19 @@ if [ ${SKIPTEST} -eq 0 ]; then LogText "Test: Check accounting information" if [ -f /var/account/pacct ]; then - Display --indent 2 --text "- Checking accounting information" --result OK --color GREEN + Display --indent 2 --text "- Checking accounting information" --result "${STATUS_OK}" --color GREEN LogText "Result: /var/account/pacct available" AddHP 3 3 elif [ -f /var/log/account/pacct ]; then - Display --indent 2 --text "- Checking accounting information" --result OK --color GREEN + Display --indent 2 --text "- Checking accounting information" --result "${STATUS_OK}" --color GREEN LogText "Result: /var/log/account/pacct available" AddHP 3 3 elif [ -f /var/log/pacct ]; then - Display --indent 2 --text "- Checking accounting information" --result OK --color GREEN + Display --indent 2 --text "- Checking accounting information" --result "${STATUS_OK}" --color GREEN LogText "Result: /var/log/pacct available" AddHP 3 3 else - Display --indent 2 --text "- Checking accounting information" --result "NOT FOUND" --color YELLOW + Display --indent 2 --text "- Checking accounting information" --result "${STATUS_NOT_FOUND}" --color YELLOW LogText "Result: No accounting information available (/var/account/pacct, /var/log/account/pact nor /var/log/pact exist)" LogText "Remark: Possibly there is another location where the accounting data is stored" ReportSuggestion ${TEST_NO} "Enable process accounting" @@ -107,25 +107,25 @@ FIND=`grep "^ENABLED" /etc/default/sysstat | grep -i true` if [ ! "${FIND}" = "" ]; then LogText "Result: sysstat enabled via /etc/default/sysstat" - Display --indent 2 --text "- Checking sysstat accounting data" --result ENABLED --color GREEN + Display --indent 2 --text "- Checking sysstat accounting data" --result "${STATUS_ENABLED}" --color GREEN else LogText "Result: sysstat disabled via /etc/default/sysstat" - Display --indent 2 --text "- Checking sysstat accounting data" --result DISABLED --color WHITE + Display --indent 2 --text "- Checking sysstat accounting data" --result "${STATUS_DISABLED}" --color WHITE ReportSuggestion ${TEST_NO} "Enable sysstat to collect accounting (disabled)" fi elif [ -f /etc/cron.d/sysstat ]; then FIND=`grep -v '^[[:space:]]*\(#\|$\)' /etc/cron.d/sysstat` if [ ! "${FIND}" = "" ]; then LogText "Result: sysstat enabled via /etc/cron.d/sysstat" - Display --indent 2 --text "- Checking sysstat accounting data" --result ENABLED --color GREEN + Display --indent 2 --text "- Checking sysstat accounting data" --result "${STATUS_ENABLED}" --color GREEN else LogText "Result: sysstat disabled via /etc/cron.d/sysstat" - Display --indent 2 --text "- Checking sysstat accounting data" --result DISABLED --color WHITE + Display --indent 2 --text "- Checking sysstat accounting data" --result "${STATUS_DISABLED}" --color WHITE ReportSuggestion ${TEST_NO} "Enable sysstat to collect accounting (cron disabled)" fi else LogText "Result: sysstat not found via /etc/default/sysstat or /etc/cron.d/sysstat" - Display --indent 2 --text "- Checking sysstat accounting data" --result "NOT FOUND" --color YELLOW + Display --indent 2 --text "- Checking sysstat accounting data" --result "${STATUS_NOT_FOUND}" --color YELLOW ReportSuggestion ${TEST_NO} "Enable sysstat to collect accounting (no results)" fi fi @@ -142,7 +142,7 @@ IsRunning auditd if [ ${RUNNING} -eq 1 ]; then LogText "Result: auditd running" - Display --indent 2 --text "- Checking auditd" --result ENABLED --color GREEN + Display --indent 2 --text "- Checking auditd" --result "${STATUS_ENABLED}" --color GREEN LINUX_AUDITD_RUNNING=1 AUDIT_DAEMON_RUNNING=1 Report "audit_trail_tool[]=auditd" @@ -150,7 +150,7 @@ AddHP 4 4 else LogText "Result: auditd not active" - Display --indent 2 --text "- Checking auditd" --result "NOT FOUND" --color WHITE + Display --indent 2 --text "- Checking auditd" --result "${STATUS_NOT_FOUND}" --color WHITE if [ ! "${VMTYPE}" = "openvz" ]; then ReportSuggestion ${TEST_NO} "Enable auditd to collect audit information" fi @@ -170,12 +170,12 @@ FIND=`${AUDITCTLBINARY} -l | grep -v "No rules"` if [ "${FIND}" = "" ]; then LogText "Result: auditd rules empty" - Display --indent 4 --text "- Checking audit rules" --result SUGGESTION --color YELLOW + Display --indent 4 --text "- Checking audit rules" --result "${STATUS_SUGGESTION}" --color YELLOW AddHP 0 2 ReportSuggestion ${TEST_NO} "Audit daemon is enabled with an empty ruleset. Disable the daemon or define rules" else LogText "Result: found auditd rules" - Display --indent 4 --text "- Checking audit rules" --result OK --color GREEN + Display --indent 4 --text "- Checking audit rules" --result "${STATUS_OK}" --color GREEN # Log audit daemon rules FIND=`${AUDITCTLBINARY} -l | sed 's/ /!space!/g'` for I in ${FIND}; do @@ -203,10 +203,10 @@ done # Check if we discovered the configuration file. It should be there is the binaries are available and process is running if [ ! "${AUDITD_CONF_FILE}" = "" ]; then - Display --indent 4 --text "- Checking audit configuration file" --result OK --color GREEN + Display --indent 4 --text "- Checking audit configuration file" --result "${STATUS_OK}" --color GREEN else LogText "Result: could not find auditd configuration file" - Display --indent 4 --text "- Checking audit configuration file" --result WARNING --color RED + Display --indent 4 --text "- Checking audit configuration file" --result "${STATUS_WARNING}" --color RED ReportSuggestion ${TEST_NO} "Determine the location of auditd configuration file" fi fi @@ -225,16 +225,16 @@ LogText "Defined value: ${FIND}" if [ -f ${FIND} ]; then LogText "Result: log file ${FIND} exists on disk" - Display --indent 4 --text "- Checking auditd log file" --result FOUND --color GREEN + Display --indent 4 --text "- Checking auditd log file" --result "${STATUS_FOUND}" --color GREEN Report "logfile[]=${FIND}" else LogText "Result: can't find log file ${FIND} on disk" - Display --indent 4 --text "- Checking auditd log file" --result SUGGESTION --color YELLOW + Display --indent 4 --text "- Checking auditd log file" --result "${STATUS_SUGGESTION}" --color YELLOW ReportSuggestion ${TEST_NO} "Check auditd log file location" fi else LogText "Result: no log file found" - Display --indent 4 --text "- Checking auditd log file" --result WARNING --color RED + Display --indent 4 --text "- Checking auditd log file" --result "${STATUS_WARNING}" --color RED ReportWarning ${TEST_NO} "L" "Auditd log file is defined but can not be found on disk" fi fi @@ -248,7 +248,7 @@ FILE="/lib/snoopy.so" if [ -f ${FILE} ]; then LogText "Result: found ${FILE}" - Display --indent 2 --text "- Checking Snoopy" --result FOUND --color GREEN + Display --indent 2 --text "- Checking Snoopy" --result "${STATUS_FOUND}" --color GREEN if [ -f /etc/ld.so.preload ]; then LogText "Result: found /etc/ld.so.preload, testing if snoopy.so is listed" FIND=`grep ${FILE} /etc/ld.so.preload` @@ -258,13 +258,13 @@ Display --indent 6 --text "- Library in ld.so.preload" --result "LOADED" --color GREEN Report "audit_trail_tool[]=snoopy" else - Display --indent 6 --text "- Library in ld.so.preload" --result "NOT FOUND" --color YELLOW + Display --indent 6 --text "- Library in ld.so.preload" --result "${STATUS_NOT_FOUND}" --color YELLOW ReportSuggestion ${TEST_NO} "Snoopy is installed but not loaded via /etc/ld.so.preload" AddHP 3 3 fi else LogText "Result: /etc/ld.so.preload does not exist" - Display --indent 6 --text "- Library in ld.so.preload" --result "UNKNOWN" --color PURPLE + Display --indent 6 --text "- Library in ld.so.preload" --result "${STATUS_UNKNOWN}" --color PURPLE ReportException "${TEST_NO}:1" "Unsure how Snoopy might be loaded as ld.so.preload does not exist" fi fi @@ -282,10 +282,10 @@ LogText "Result: Solaris audit daemon is running" SOLARIS_AUDITD_RUNNING=1 AUDIT_DAEMON_RUNNING=1 - Display --indent 2 --text "- Checking Solaris audit daemon status" --result RUNNING --color GREEN + Display --indent 2 --text "- Checking Solaris audit daemon status" --result "${STATUS_RUNNING}" --color GREEN else LogText "Result: Solaris audit daemon is not running" - Display --indent 2 --text "- Checking Solaris audit daemon status" --result "NOT RUNNING" --color YELLOW + Display --indent 2 --text "- Checking Solaris audit daemon status" --result "${STATUS_NOT_RUNNING}" --color YELLOW fi fi # @@ -300,7 +300,7 @@ FIND=`/usr/bin/svcs svc:/system/auditd:default | grep "^online"` if [ ! "${FIND}" = "" ]; then LogText "Result: auditd service is online" - Display --indent 4 --text "- Checking Solaris audit daemon status" --result ONLINE --color GREEN + Display --indent 4 --text "- Checking Solaris audit daemon status" --result "${STATUS_ON}"LINE --color GREEN else Display --indent 4 --text "- Checking Solaris audit daemon status" --result "NOT ONLINE" --color YELLOW ReportSuggestion "${TEST_NO}" "Check status of audit daemon" @@ -319,9 +319,9 @@ FIND=`grep 'set c2audit:audit_load = 1' /etc/system` if [ ! "${FIND}" = "" ]; then LogText "Result: BSM is enabled in /etc/system" - Display --indent 4 --text "- Checking Solaris BSM (/etc/system)" --result ENABLED --color GREEN + Display --indent 4 --text "- Checking Solaris BSM (/etc/system)" --result "${STATUS_ENABLED}" --color GREEN else - Display --indent 4 --text "- Checking Solaris BSM (/etc/system)" --result "NOT FOUND" --color YELLOW + Display --indent 4 --text "- Checking Solaris BSM (/etc/system)" --result "${STATUS_NOT_FOUND}" --color YELLOW fi else LogText "Result: /etc/system does not exist" @@ -340,10 +340,10 @@ FIND=`/usr/sbin/modinfo | grep c2audit` if [ ! "${FIND}" = "" ]; then LogText "Result: c2audit found in modinfo output" - Display --indent 4 --text "- Checking Solaris BSM (modules list)" --result ENABLED --color GREEN + Display --indent 4 --text "- Checking Solaris BSM (modules list)" --result "${STATUS_ENABLED}" --color GREEN else LogText "Result: c2audit not found in modinfo output" - Display --indent 4 --text "- Checking Solaris BSM (modules list)" --result "NOT FOUND" --color YELLOW + Display --indent 4 --text "- Checking Solaris BSM (modules list)" --result "${STATUS_NOT_FOUND}" --color YELLOW fi else LogText "Result: /usr/sbin/modinfo does not exist, skipping test" @@ -366,20 +366,20 @@ LogText "Test: Checking if location is a valid directory" if [ -d ${FIND} ]; then LogText "Result: location ${FIND} is valid" - Display --indent 4 --text "- Checking Solaris audit location" --result FOUND --color GREEN + Display --indent 4 --text "- Checking Solaris audit location" --result "${STATUS_FOUND}" --color GREEN else LogText "Result: location ${FIND} does not exist" - Display --indent 4 --text "- Checking Solaris audit location" --result "NOT FOUND" --color YELLOW + Display --indent 4 --text "- Checking Solaris audit location" --result "${STATUS_NOT_FOUND}" --color YELLOW ReportSuggestion "${TEST_NO}" "Check if the Solaris audit directory is available" fi else LogText "Result: unknown event location" - Display --indent 4 --text "- Checking Solaris audit location" --result UNKNOWN --color YELLOW + Display --indent 4 --text "- Checking Solaris audit location" --result "${STATUS_UNKNOWN}" --color YELLOW ReportSuggestion "${TEST_NO}" "Check if the Solaris audit directory is properly configured" fi else LogText "Result: could not find /etc/security/audit_control" - Display --indent 4 --text "- Checking Solaris audit location" --result SKIPPED --color YELLOW + Display --indent 4 --text "- Checking Solaris audit location" --result "${STATUS_SKIPPED}" --color YELLOW fi fi # @@ -396,10 +396,10 @@ for I in ${FIND}; do LogText "Output: ${I}" done - Display --indent 4 --text "- Checking Solaris audit statistics" --result DONE --color GREEN + Display --indent 4 --text "- Checking Solaris audit statistics" --result "${STATUS_DONE}" --color GREEN else LogText "Result: /usr/sbin/auditstat not found, skipping test" - Display --indent 4 --text "- Checking Solaris audit statistics" --result SKIPPED --color YELLOW + Display --indent 4 --text "- Checking Solaris audit statistics" --result "${STATUS_SKIPPED}" --color YELLOW fi fi # |