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:
Diffstat (limited to 'include/tests_databases')
-rw-r--r--include/tests_databases52
1 files changed, 26 insertions, 26 deletions
diff --git a/include/tests_databases b/include/tests_databases
index da0a3a07..4b5a8052 100644
--- a/include/tests_databases
+++ b/include/tests_databases
@@ -37,10 +37,10 @@
if [ ${SKIPTEST} -eq 0 ]; then
FIND=`${PSBINARY} ax | egrep "mysqld|mysqld_safe" | grep -v "grep"`
if [ "${FIND}" = "" ]; then
- Display --indent 2 --text "- MySQL process status..." --result "NOT FOUND" --color WHITE
+ Display --indent 2 --text "- MySQL process status" --result "NOT FOUND" --color WHITE
logtext "Result: MySQL process not active"
else
- Display --indent 2 --text "- MySQL process status..." --result "FOUND" --color GREEN
+ Display --indent 2 --text "- MySQL process status" --result "FOUND" --color GREEN
logtext "Result: MySQL is active"
MYSQL_RUNNING=1
fi
@@ -70,19 +70,19 @@
if [ ! "${MYSQLCLIENTBINARY}" = "" -a ${MYSQL_RUNNING} -eq 1 ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
Register --test-no DBS-1816 --preqs-met ${PREQS_MET} --weight L --network NO --description "Checking MySQL root password"
if [ ${SKIPTEST} -eq 0 ]; then
- logtext "Test: Trying to login to local MySQL server without password"
- FIND=`${MYSQLCLIENTBINARY} -u root --password= --silent --batch --execute="" 2> /dev/null; echo $?`
- if [ "${FIND}" = "0" ]; then
- logtext "Result: Login succeeded, no MySQL root password set!"
- ReportWarning ${TEST_NO} "H" "No MySQL root password set"
- ReportSuggestion ${TEST_NO} "Use mysqladmin to set a MySQL root password (mysqladmin -u root -p password MYPASSWORD)"
- Display --indent 4 --text "- Checking empty MySQL root password" --result WARNING --color RED
- AddHP 0 5
- else
- logtext "Result: Login did not succeed, so a MySQL root password is set"
- Display --indent 4 --text "- Checking MySQL root password" --result OK --color GREEN
- AddHP 2 2
- fi
+ logtext "Test: Trying to login to local MySQL server without password"
+ FIND=`${MYSQLCLIENTBINARY} -u root --password= --silent --batch --execute="" 2> /dev/null; echo $?`
+ if [ "${FIND}" = "0" ]; then
+ logtext "Result: Login succeeded, no MySQL root password set!"
+ ReportWarning ${TEST_NO} "H" "No MySQL root password set"
+ ReportSuggestion ${TEST_NO} "Use mysqladmin to set a MySQL root password (mysqladmin -u root -p password MYPASSWORD)"
+ Display --indent 4 --text "- Checking empty MySQL root password" --result WARNING --color RED
+ AddHP 0 5
+ else
+ logtext "Result: Login did not succeed, so a MySQL root password is set"
+ Display --indent 4 --text "- Checking MySQL root password" --result OK --color GREEN
+ AddHP 2 2
+ fi
else
logtext "Test skipped, MySQL daemon not running or no MySQL client available"
fi
@@ -93,15 +93,15 @@
# Description : Check if PostgreSQL is being used
Register --test-no DBS-1826 --weight L --network NO --description "Checking active PostgreSQL processes"
if [ ${SKIPTEST} -eq 0 ]; then
- FIND=`${PSBINARY} ax | grep "postgres:" | grep -v "grep"`
- if [ "${FIND}" = "" ]; then
- Display --indent 2 --text "- PostgreSQL processes status..." --result "NOT FOUND" --color WHITE
- logtext "Result: PostgreSQL process not active"
- else
- Display --indent 2 --text "- PostgreSQL processes status..." --result "FOUND" --color GREEN
- logtext "Result: PostgreSQL is active"
- POSTGRESQL_RUNNING=1
- fi
+ FIND=`${PSBINARY} ax | grep "postgres:" | grep -v "grep"`
+ if [ "${FIND}" = "" ]; then
+ Display --indent 2 --text "- PostgreSQL processes status" --result "NOT FOUND" --color WHITE
+ logtext "Result: PostgreSQL process not active"
+ else
+ Display --indent 2 --text "- PostgreSQL processes status" --result "FOUND" --color GREEN
+ logtext "Result: PostgreSQL is active"
+ POSTGRESQL_RUNNING=1
+ fi
fi
#
#################################################################################
@@ -120,10 +120,10 @@
if [ ${SKIPTEST} -eq 0 ]; then
FIND=`${PSBINARY} ax | egrep "ora_pmon|ora_smon|tnslsnr" | grep -v "grep"`
if [ "${FIND}" = "" ]; then
- Display --indent 2 --text "- Oracle processes status..." --result "NOT FOUND" --color WHITE
+ Display --indent 2 --text "- Oracle processes status" --result "NOT FOUND" --color WHITE
logtext "Result: Oracle process(es) not active"
else
- Display --indent 2 --text "- Oracle processes status..." --result "FOUND" --color GREEN
+ Display --indent 2 --text "- Oracle processes status" --result "FOUND" --color GREEN
logtext "Result: Oracle is active"
ORACLE_RUNNING=1
fi