diff options
author | Tatiana A. Nurnberg <azundris@mysql.com> | 2009-11-24 10:22:22 -0800 |
---|---|---|
committer | Tatiana A. Nurnberg <azundris@mysql.com> | 2009-11-24 10:22:22 -0800 |
commit | 9ae245009cce1f8a48e38a698737698c4c5e4412 (patch) | |
tree | e33e7618e8732a5d157223feca0625771b0ee7ce /sql/sql_acl.cc | |
parent | 18448bc05c2780a31fedbaec475d41dacff7ba75 (diff) | |
parent | be04d1a47953188ced936a81824fdf871b8e9656 (diff) | |
download | mariadb-git-9ae245009cce1f8a48e38a698737698c4c5e4412.tar.gz |
auto-merge
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r-- | sql/sql_acl.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index eb91f66d114..ed9adbd96e1 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -3462,6 +3462,13 @@ bool mysql_grant(THD *thd, const char *db, List <LEX_USER> &list, result= TRUE; continue; } + /* + No User, but a password? + They did GRANT ... TO CURRENT_USER() IDENTIFIED BY ... ! + Get the current user, and shallow-copy the new password to them! + */ + if (!tmp_Str->user.str && tmp_Str->password.str) + Str->password= tmp_Str->password; if (replace_user_table(thd, tables[0].table, *Str, (!db ? rights : 0), revoke_grant, create_new_users, test(thd->variables.sql_mode & |