1
0
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:
Sergei Golubchik
2014-11-24 16:55:56 +01:00
parent 91ad0cd580
commit 7bd9eb1f41
3 changed files with 43 additions and 72 deletions

View File

@ -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)