[MDEV-10463] Granted as a whole to roles, databases are not shown in SHOW DATABASES Created: 2016-07-29 Updated: 2018-04-23 Resolved: 2017-06-15 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Authentication and Privilege System |
| Affects Version/s: | 10.1.14, 10.1.17 |
| Fix Version/s: | 10.1.25, 10.0.32, 10.2.7 |
| Type: | Bug | Priority: | Major |
| Reporter: | Igor Pashev | Assignee: | Vicențiu Ciorbaru |
| Resolution: | Fixed | Votes: | 4 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Sprint: | 10.1.18, 10.1.19, 10.1.22 | ||||||||||||||||
| Description |
|
If a role is granted on the whole database (SELECT ON db.* TO role1;), and a user is granted this role (GRANT role1 TO user1;), then that databases is not listed by SHOW DATABASES;, but still can be used (set as default, SHOW TABLES IN ..., DESCRIBE ...) Test case:
Expected result (hopefully):
Failing:
|
| Comments |
| Comment by Igor Pashev [ 2016-07-29 ] | |||||||||||||||||||||||||||||||||||
|
Dirty patch:
| |||||||||||||||||||||||||||||||||||
| Comment by Vicențiu Ciorbaru [ 2016-10-26 ] | |||||||||||||||||||||||||||||||||||
|
Investigated this a bit. It seems like no SHOW xxx command will work, as none are actually checking role privileges. | |||||||||||||||||||||||||||||||||||
| Comment by Vicențiu Ciorbaru [ 2017-05-22 ] | |||||||||||||||||||||||||||||||||||
|
This issue affects 10.0 as well. Fixing the bug there, as it will get merged to 10.1 implicitly. |