mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-29668 SUPER should not allow actions that have fine-grained dedicated privileges
SUPER privilege used to allow various actions that were alternatively allowed by one of BINLOG ADMIN, BINLOG MONITOR, BINLOG REPLAY, CONNECTION ADMIN, FEDERATED ADMIN, REPL MASTER ADMIN, REPL SLAVE ADMIN, SET USER, SLAVE MONITOR. Now SUPER no longer does that, one has to grant one of the fine-grained privileges above to be to perform corresponding actions. On upgrade from MariaDB versions 10.11 and below all the privileges above are granted automatically if the user has SUPER. As a side-effect, such an upgrade will allow SUPER-user to run SHOW BINLOG EVENTS, SHOW RELAYLOG EVENTS, SHOW SLAVE HOSTS, even if he wasn't able to do it before the upgrade.
This commit is contained in:
@@ -1353,7 +1353,7 @@ drop trigger trg1_0;
|
||||
create definer=not_ex_user@localhost trigger trg1_0
|
||||
before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_0-yes';
|
||||
ERROR 42000: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
|
||||
ERROR 42000: Access denied; you need (at least one of) the SET USER privilege(s) for this operation
|
||||
create definer=current_user trigger trg1_1
|
||||
before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_1-yes';
|
||||
@@ -1388,7 +1388,7 @@ GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`loca
|
||||
create definer=not_ex_user@localhost trigger trg1_3
|
||||
after UPDATE on t1 for each row
|
||||
set @var1 = 'trig 1_3-yes';
|
||||
ERROR 42000: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
|
||||
ERROR 42000: Access denied; you need (at least one of) the SET USER privilege(s) for this operation
|
||||
connection default;
|
||||
select current_user;
|
||||
current_user
|
||||
|
Reference in New Issue
Block a user