mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Added more tests to grant2. Fixed some previous tests.
Added new logic to ACL system:
1) If GRANT OPTION (not mysql db):
Ok to update existing user, but not password.
Not allowed to make a new user.
2) If UPDATE_ACL to mysql DB:
Ok to update current user, but not make a new one.
3) If INSERT_ACL to mysql DB:
Ok to add a new user, but not modify existing.
4) If GRANT OPTION to mysql DB:
All modifications OK.
mysql-test/r/grant2.result:
Added more ACL tests and fixed results in some old tests.
mysql-test/t/grant2.test:
Added more ACL tests and fixed results in some old tests.
sql/sql_acl.h:
Made check_acl_user() visible to sql_parse.cc
sql/sql_parse.cc:
Added new logic to ACL system:
1) If GRANT OPTION (not mysql db):
Ok to update existing user, but not password.
Not allowed to make a new user.
2) If UPDATE_ACL to mysql DB:
Ok to update current user, but not make a new one.
3) If INSERT_ACL to mysql DB:
Ok to add a new user, but not modify existing.
4) If GRANT OPTION to mysql DB:
All modifications OK.
This commit is contained in:
@@ -190,6 +190,8 @@ bool mysql_table_grant(THD *thd, TABLE_LIST *table, List <LEX_USER> &user_list,
|
||||
bool mysql_procedure_grant(THD *thd, TABLE_LIST *table,
|
||||
List <LEX_USER> &user_list, ulong rights,
|
||||
bool revoke, bool no_error);
|
||||
ACL_USER *check_acl_user(LEX_USER *user_name,
|
||||
uint *acl_acl_userdx);
|
||||
my_bool grant_init(THD *thd);
|
||||
void grant_free(void);
|
||||
void grant_reload(THD *thd);
|
||||
|
||||
Reference in New Issue
Block a user