[MDEV-14735] better matching order for grants Created: 2017-12-21 Updated: 2020-04-24 Resolved: 2019-06-17 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Authentication and Privilege System |
| Fix Version/s: | 10.4.6 |
| Type: | Task | Priority: | Major |
| Reporter: | Sergei Golubchik | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
grants are sorted by get_sort(), the idea is that more specific grants gets sorted (and matched) before less specific. The historical implementation is rather naïve and does not handle many cases correctly. See linked bug reports for details. |
| Comments |
| Comment by Oleksandr Byelkin [ 2019-06-15 ] |
|
OK to push, but please note (in the very beginning of description and well visible) that each d or h require 26 bit and u 1 bit of result. It is just for future use to avoid using "hdhd" by example of "huhu". Maybe add counter of shifts in debug version and ASSERT that it will not move over sizeof(ulonglong) but it is if you like the idea. |