diff options
author | Sergei Golubchik <serg@mariadb.org> | 2019-01-09 19:17:06 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2019-01-23 17:34:22 +0100 |
commit | c2a4bfad223903931171c473c42646e93dd0e728 (patch) | |
tree | 9e46bbc8a2e437452be522a304e225b330dd863d /sql/sql_acl.cc | |
parent | d24060b1796bac5b11aee49f1c157dfc2c8200c1 (diff) | |
download | mariadb-git-c2a4bfad223903931171c473c42646e93dd0e728.tar.gz |
MDEV-18119 upgrading from 10.3 to 10.4 can result in the password for a user to be wiped out
10.1 part: SHOW CREATE USER didn't show the password, if plugin was set,
but authentication_string was not
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r-- | sql/sql_acl.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 784f2338a55..9d6e6c51fb6 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -986,8 +986,7 @@ static bool fix_user_plugin_ptr(ACL_USER *user) else return true; - if (user->auth_string.length) - set_user_salt(user, user->auth_string.str, user->auth_string.length); + set_user_salt(user, user->auth_string.str, user->auth_string.length); return false; } @@ -1457,6 +1456,11 @@ static bool acl_load(THD *thd, TABLE_LIST *tables) safe_str(user.user.str), safe_str(user.host.hostname)); } + else if (password_len) + { + user.auth_string.str= password; + user.auth_string.length= password_len; + } fix_user_plugin_ptr(&user); } |