[MDEV-13655] SET ROLE does not properly grant privileges. Created: 2017-08-26 Updated: 2017-12-20 Resolved: 2017-12-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Authentication and Privilege System |
| Affects Version/s: | 10.0, 10.1, 10.2.8, 10.2 |
| Fix Version/s: | 10.0.34, 10.1.30, 10.2.12 |
| Type: | Bug | Priority: | Major |
| Reporter: | Dusty VonHandorf | Assignee: | Vicențiu Ciorbaru |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | roles | ||
| Environment: |
Docker: MacOS Sierra 10.12.6 MariaDB Docker Image ID 58730544b81b (mariadb:latest at time of filing). |
||
| Sprint: | 10.1.30 |
| Description |
|
Running SET ROLE statement still yields permission denied when trying to create a database.
Then,
Granting all privileges directly to the user allows the user to create the database. |
| Comments |
| Comment by Dusty VonHandorf [ 2017-08-26 ] |
|
In the example "s" is abbreviated for standard user, "a" for admin user and "u" for user. I wanted to make sure it is not a regression for a similar bug I saw in JIRA that was already closed. |
| Comment by Elena Stepanova [ 2017-08-26 ] |
|
Thanks for the report. The culprit is the limited permissions to the database given to role s. Without it (or without giving this role to a), of if the limited permissions are granted to s after ALL is granted to a, it works all right. We had a somewhat similar bug report |
| Comment by Vicențiu Ciorbaru [ 2017-12-20 ] |
|
Fixed with: https://github.com/MariaDB/server/commit/2fced9e7b643d0c101d0ffde33f51e0a38f7017e |