mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
parser: store the password hash in LEX_USER::auth, not in ::password
* indeed, "username IDENTIFIED BY PASSWORD hash" is the same as "username IDENTIFIED VIA mysql_native_password USING hash" * LEX_USER::password can now be used for plain-text passwords
This commit is contained in:
@ -4591,29 +4591,6 @@ end_with_restore_list:
|
||||
lex->grant & GRANT_ACL))
|
||||
goto error;
|
||||
}
|
||||
else if (user->password.str)
|
||||
{
|
||||
// Are we trying to change a password of another user?
|
||||
const char *hostname= user->host.str, *username=user->user.str;
|
||||
bool userok;
|
||||
if (username == current_user.str)
|
||||
{
|
||||
username= thd->security_ctx->priv_user;
|
||||
hostname= thd->security_ctx->priv_host;
|
||||
userok= true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!hostname)
|
||||
hostname= host_not_specified.str;
|
||||
userok= is_acl_user(hostname, username);
|
||||
}
|
||||
|
||||
if (userok && check_change_password (thd, hostname, username,
|
||||
user->password.str,
|
||||
user->password.length))
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (first_table)
|
||||
|
Reference in New Issue
Block a user