From fe5990f20875d85ce8fcdbc06f4a760cddd5a5b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Sj=C3=B6gren?= Date: Tue, 23 Aug 2022 11:56:25 +0200 Subject: [PATCH 1/4] remove whitespaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Sjögren --- include/tests_databases | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/tests_databases b/include/tests_databases index f5bc22ae..7c829cd3 100644 --- a/include/tests_databases +++ b/include/tests_databases @@ -85,7 +85,7 @@ LogText "Test: Trying to login to local MySQL server without password" # "-u root --password=" avoids ~/.my.cnf authentication settings - # "plugin = 'mysql_native_password' AND authentication_string = ''" avoids false positives when secure plugins are used + # "plugin = 'mysql_native_password' AND authentication_string = ''" avoids false positives when secure plugins are used FIND=$(${MYSQLCLIENTBINARY} --default-auth=mysql_native_password --no-defaults -u root --password= --silent --batch --execute="SELECT count(*) FROM mysql.user WHERE user = 'root' AND plugin = 'mysql_native_password' AND authentication_string = ''" mysql > /dev/null 2>&1; echo $?) if [ "${FIND}" = "0" ]; then LogText "Result: Login succeeded, no MySQL root password set!" @@ -213,7 +213,7 @@ ReportWarning "${TEST_NO}" "PostgreSQL configuration file ${CF} is world readable and might leak sensitive details" "${CF}" "Use chmod 600 to change file permissions" else LogText "Result: great, configuration file ${CF} is not world readable" - fi + fi done fi # From fc62b39f34b32f5d31502578f4f9a78b494b331d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Sj=C3=B6gren?= Date: Tue, 23 Aug 2022 11:57:05 +0200 Subject: [PATCH 2/4] find redis.conf if /snap directory exists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Sjögren --- include/tests_databases | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/tests_databases b/include/tests_databases index 7c829cd3..153e74ac 100644 --- a/include/tests_databases +++ b/include/tests_databases @@ -302,6 +302,12 @@ if [ ${QNAP_DEVICE} -eq 1 ]; then PATHS="${PATHS} ${ROOTDIR}share/CACHEDEV1_DATA/.qpkg/QKVM/usr/etc/redis.conf" fi + if [ -d "/snap" ]; then + for SNAP_PATH in $(${FINDBINARY} /snap -name 'redis.conf' -type f); do + PATHS="${PATHS} ${SNAP_PATH}" + done + fi + ALLFILES=$(${LSBINARY} ${ROOTDIR}etc/redis.conf 2> /dev/null) FOUND=0 for DIR in ${PATHS}; do From 4f6eeb7537077d145860e19f83d44f59d182ea2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Sj=C3=B6gren?= Date: Wed, 24 Aug 2022 10:17:54 +0200 Subject: [PATCH 3/4] remove file from path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Sjögren --- include/tests_databases | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/tests_databases b/include/tests_databases index 153e74ac..34bace85 100644 --- a/include/tests_databases +++ b/include/tests_databases @@ -303,7 +303,7 @@ PATHS="${PATHS} ${ROOTDIR}share/CACHEDEV1_DATA/.qpkg/QKVM/usr/etc/redis.conf" fi if [ -d "/snap" ]; then - for SNAP_PATH in $(${FINDBINARY} /snap -name 'redis.conf' -type f); do + for SNAP_PATH in $(${FINDBINARY} /snap -name 'redis.conf' -type f | ${SEDBINARY} 's/redis.conf$//g'); do PATHS="${PATHS} ${SNAP_PATH}" done fi From 1d3de505798c2a0fc150d9488eefe5f3ce386deb Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Tue, 12 Mar 2024 13:38:04 +0100 Subject: [PATCH 4/4] Update tests_databases --- include/tests_databases | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/tests_databases b/include/tests_databases index 34bace85..bcf0a3a6 100644 --- a/include/tests_databases +++ b/include/tests_databases @@ -302,8 +302,8 @@ if [ ${QNAP_DEVICE} -eq 1 ]; then PATHS="${PATHS} ${ROOTDIR}share/CACHEDEV1_DATA/.qpkg/QKVM/usr/etc/redis.conf" fi - if [ -d "/snap" ]; then - for SNAP_PATH in $(${FINDBINARY} /snap -name 'redis.conf' -type f | ${SEDBINARY} 's/redis.conf$//g'); do + if [ -d "${ROOTDIR}snap" ]; then + for SNAP_PATH in $(${FINDBINARY} ${ROOTDIR}snap -name 'redis.conf' -type f | ${SEDBINARY} 's/redis.conf$//g'); do PATHS="${PATHS} ${SNAP_PATH}" done fi