Skip to content

Commit 04122ed

Browse files
committed
MDEV-36815 Fresh MariaDB 11.4 installation gives errors when configuring utf8
rewrite the check to use mysql.global_priv (finally!)
1 parent 46135c6 commit 04122ed

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

debian/additions/debian-start.inc.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,13 @@ function check_root_accounts() {
8484

8585
logger -p daemon.info -i -t"$0" "Checking for insecure root accounts."
8686

87-
ret=$(echo "SELECT count(*) FROM mysql.user WHERE user='root' and password='' and password_expired='N' and plugin in ('', 'mysql_native_password', 'mysql_old_password');" | $MARIADB --skip-column-names)
87+
ret=$(echo "
88+
SELECT count(*) FROM mysql.global_priv
89+
WHERE user='root' AND
90+
JSON_VALUE(priv, '$.plugin') in ('mysql_native_password', 'mysql_old_password', 'parsec') AND
91+
JSON_VALUE(priv, '$.authentication_string') = '' AND
92+
JSON_VALUE(priv, '$.password_last_changed') != 0
93+
" | $MARIADB --skip-column-names)
8894
if [ "$ret" -ne "0" ]
8995
then
9096
logger -p daemon.warn -i -t"$0" "WARNING: mysql.user contains $ret root accounts without password!"

0 commit comments

Comments
 (0)