mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
f13b80af39
the idea of main.failed_auth_unixsocket was to have existing user account (root) authenticate with unix_socket, then login with non-existent user name, Non-existent user name forces the server to perform the authentication in the name of some random existing user. But it must still fail at the end, as the user name is wrong. In 10.4 a second predefined user was added, mariadb.sys, so root is not the only user in mysql.global_priv and unix_socket auth must be forced for all existing user accounts, because we cannot know what user account the server will randomly pick for non-existing user auth.
10 lines
491 B
Text
10 lines
491 B
Text
create table global_priv_backup select * from mysql.global_priv;
|
|
update mysql.global_priv set priv=json_insert(priv, '$.plugin', 'unix_socket');
|
|
delete from mysql.global_priv where user != 'root';
|
|
flush privileges;
|
|
connect(localhost,USER,,test,MASTER_PORT,MASTER_SOCKET);
|
|
ERROR 28000: Access denied for user 'USER'@'localhost'
|
|
ERROR 28000: Access denied for user 'USER'@'localhost'
|
|
replace mysql.global_priv select * from global_priv_backup;
|
|
flush privileges;
|
|
drop table global_priv_backup;
|