1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

bugfix: propagate grant changes through the role graph after table/column/routine grants

This commit is contained in:
Sergei Golubchik
2013-10-18 12:21:37 -07:00
parent d0db4f2261
commit c28bf2a344
7 changed files with 32 additions and 44 deletions

View File

@ -26,7 +26,6 @@ end|
grant execute on function mysql.test_func to test_role2;
grant execute on procedure mysql.test_proc to test_role2;
grant execute on mysql.* to test_role3;
flush privileges;
show grants;
Grants for test_user@localhost
GRANT USAGE ON *.* TO 'test_user'@'localhost'
@ -98,6 +97,4 @@ delete from mysql.user where user like'test_%';
delete from mysql.roles_mapping where Role like 'test%';
drop function mysql.test_func;
drop procedure mysql.test_proc;
Warnings:
Warning 1403 There is no such grant defined for user 'test_role1' on host '' on routine 'test_proc'
flush privileges;

View File

@ -13,7 +13,6 @@ Host User Role Admin_option
test_role1 test_role2 N
localhost test_user test_role1 N
grant select (Role) on mysql.roles_mapping to test_role2;
flush privileges;
select * from mysql.roles_mapping;
ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping'
show grants;

View File

@ -13,7 +13,6 @@ Host User Role Admin_option
test_role1 test_role2 N
localhost test_user test_role1 N
grant select on mysql.roles_mapping to test_role2;
flush privileges;
select * from mysql.roles_mapping;
ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping'
show grants;

View File

@ -29,8 +29,6 @@ grant execute on procedure mysql.test_proc to test_role2;
grant execute on mysql.* to test_role3;
flush privileges;
change_user 'test_user';
--sorted_result
show grants;

View File

@ -11,8 +11,6 @@ select * from mysql.roles_mapping;
grant select (Role) on mysql.roles_mapping to test_role2;
flush privileges;
change_user 'test_user';
--error ER_TABLEACCESS_DENIED_ERROR

View File

@ -11,8 +11,6 @@ select * from mysql.roles_mapping;
grant select on mysql.roles_mapping to test_role2;
flush privileges;
change_user 'test_user';
--error ER_TABLEACCESS_DENIED_ERROR