mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Reapply fix for bug#16372 (Server crashes when test 'conc_sys' is running)
after merge. Concurrent read and update of privilege structures (like simultaneous run of SHOW GRANTS and ADD USER) could result in server crash. Ensure that proper locking of ACL structures is done. No test case is provided because this bug can't be reproduced deterministically.
This commit is contained in:
@ -3835,7 +3835,6 @@ end_with_restore_list:
|
||||
if (thd->security_ctx->user) // If not replication
|
||||
{
|
||||
LEX_USER *user;
|
||||
uint counter;
|
||||
|
||||
List_iterator <LEX_USER> user_list(lex->users_list);
|
||||
while ((user= user_list++))
|
||||
@ -3853,7 +3852,8 @@ end_with_restore_list:
|
||||
user->host.str, thd->security_ctx->host_or_ip))
|
||||
{
|
||||
// TODO: use check_change_password()
|
||||
if (check_acl_user(user, &counter) && user->password.str &&
|
||||
if (is_acl_user(user->host.str, user->user.str) &&
|
||||
user->password.str &&
|
||||
check_access(thd, UPDATE_ACL,"mysql",0,1,1,0))
|
||||
{
|
||||
my_message(ER_PASSWORD_NOT_ALLOWED,
|
||||
|
Reference in New Issue
Block a user