[MDEV-28985] Confusing message when trying GRANT without having GRANT OPTION Created: 2022-06-30  Updated: 2023-11-28

Status: Confirmed
Project: MariaDB Server
Component/s: Authentication and Privilege System
Affects Version/s: 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9
Fix Version/s: 10.4, 10.5, 10.6

Type: Bug Priority: Major
Reporter: Hartmut Holzgraefe Assignee: Oleksandr Byelkin
Resolution: Unresolved Votes: 0
Labels: upstream


 Description   

With a user that was created with ALL privileges, but without WITH GRANT OPTION it is possible to create users, but not to GRANT them any privileges. So far, so good, but the error message coming back from GRANT is a bit confusing:

MariaDB [(none)]> create user testme2@localhost;
Query OK, 0 rows affected (0.002 sec)
 
MariaDB [(none)]> grant all on *.* to testme2@localhost REQUIRE ssl;
ERROR 1045 (28000): Access denied for user 'testme1'@'localhost' (using password: NO)

Getting back something like User 'testme1'@'localhost' is lacking GRANT OPTION would be way more clear than Access denied for user 'testme1'@'localhost' (using password: NO)


Generated at Thu Feb 08 10:04:59 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.