2020-02-09 21:53:11 +04:00
|
|
|
#ifndef PRIVILEGE_H_INCLUDED
|
|
|
|
#define PRIVILEGE_H_INCLUDED
|
|
|
|
|
|
|
|
/* Copyright (c) 2020, MariaDB Corporation.
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; version 2 of the License.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
|
|
|
|
|
|
|
|
#include "my_global.h" // ulonglong
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
A strict enum to store privilege bits.
|
|
|
|
|
|
|
|
We should eventually make if even stricter using "enum class privilege_t" and:
|
|
|
|
- Replace all code pieces like `if (priv)` to `if (priv != NO_ACL)`
|
|
|
|
- Remove "delete" comparison operators below
|
|
|
|
*/
|
|
|
|
enum privilege_t: unsigned long long
|
|
|
|
{
|
|
|
|
NO_ACL = (0),
|
|
|
|
SELECT_ACL = (1UL << 0),
|
|
|
|
INSERT_ACL = (1UL << 1),
|
|
|
|
UPDATE_ACL = (1UL << 2),
|
|
|
|
DELETE_ACL = (1UL << 3),
|
|
|
|
CREATE_ACL = (1UL << 4),
|
|
|
|
DROP_ACL = (1UL << 5),
|
|
|
|
RELOAD_ACL = (1UL << 6),
|
|
|
|
SHUTDOWN_ACL = (1UL << 7),
|
|
|
|
PROCESS_ACL = (1UL << 8),
|
|
|
|
FILE_ACL = (1UL << 9),
|
|
|
|
GRANT_ACL = (1UL << 10),
|
|
|
|
REFERENCES_ACL = (1UL << 11),
|
|
|
|
INDEX_ACL = (1UL << 12),
|
|
|
|
ALTER_ACL = (1UL << 13),
|
|
|
|
SHOW_DB_ACL = (1UL << 14),
|
|
|
|
SUPER_ACL = (1UL << 15),
|
|
|
|
CREATE_TMP_ACL = (1UL << 16),
|
|
|
|
LOCK_TABLES_ACL = (1UL << 17),
|
|
|
|
EXECUTE_ACL = (1UL << 18),
|
|
|
|
REPL_SLAVE_ACL = (1UL << 19),
|
2020-02-28 21:59:01 +04:00
|
|
|
BINLOG_MONITOR_ACL = (1UL << 20), // Was REPL_CLIENT_ACL prior to 10.5.2
|
2020-02-09 21:53:11 +04:00
|
|
|
CREATE_VIEW_ACL = (1UL << 21),
|
|
|
|
SHOW_VIEW_ACL = (1UL << 22),
|
|
|
|
CREATE_PROC_ACL = (1UL << 23),
|
|
|
|
ALTER_PROC_ACL = (1UL << 24),
|
|
|
|
CREATE_USER_ACL = (1UL << 25),
|
|
|
|
EVENT_ACL = (1UL << 26),
|
|
|
|
TRIGGER_ACL = (1UL << 27),
|
|
|
|
CREATE_TABLESPACE_ACL = (1UL << 28),
|
2020-02-12 18:26:18 +04:00
|
|
|
DELETE_HISTORY_ACL = (1UL << 29), // Added in 10.3.4
|
2020-02-28 21:59:01 +04:00
|
|
|
SET_USER_ACL = (1UL << 30), // Added in 10.5.2
|
|
|
|
FEDERATED_ADMIN_ACL = (1UL << 31), // Added in 10.5.2
|
|
|
|
CONNECTION_ADMIN_ACL = (1ULL << 32), // Added in 10.5.2
|
|
|
|
READ_ONLY_ADMIN_ACL = (1ULL << 33), // Added in 10.5.2
|
|
|
|
REPL_SLAVE_ADMIN_ACL = (1ULL << 34), // Added in 10.5.2
|
|
|
|
REPL_MASTER_ADMIN_ACL = (1ULL << 35), // Added in 10.5.2
|
2020-03-18 20:15:53 +04:00
|
|
|
BINLOG_ADMIN_ACL = (1ULL << 36), // Added in 10.5.2
|
2020-11-16 14:31:44 +05:30
|
|
|
BINLOG_REPLAY_ACL = (1ULL << 37), // Added in 10.5.2
|
2023-09-04 13:04:06 +02:00
|
|
|
SLAVE_MONITOR_ACL = (1ULL << 38), // Added in 10.5.8
|
|
|
|
SHOW_CREATE_ROUTINE_ACL = (1ULL << 39) // added in 11.3.0
|
2020-02-09 21:53:11 +04:00
|
|
|
/*
|
2020-02-28 21:59:01 +04:00
|
|
|
When adding new privilege bits, don't forget to update:
|
|
|
|
In this file:
|
|
|
|
- Add a new LAST_version_ACL
|
|
|
|
- Add a new ALL_KNOWN_ACL_version
|
|
|
|
- Change ALL_KNOWN_ACL to ALL_KNOWN_ACL_version
|
2023-09-04 13:04:06 +02:00
|
|
|
- Change GLOBAL_ACLS, DB_ACLS, TABLE_ACLS, PROC_ACLS if needed
|
2020-02-28 21:59:01 +04:00
|
|
|
- Change SUPER_ADDED_SINCE_USER_TABLE_ACL if needed
|
|
|
|
|
|
|
|
In other files:
|
|
|
|
- static struct show_privileges_st sys_privileges[]
|
|
|
|
- static const char *command_array[] and static uint command_lengths[]
|
2022-12-12 14:20:08 +11:00
|
|
|
- mariadb_system_tables.sql and mariadb_system_tables_fix.sql
|
2020-02-28 21:59:01 +04:00
|
|
|
- acl_init() or whatever - to define behaviour for old privilege tables
|
|
|
|
- Update User_table_json::get_access()
|
|
|
|
- sql_yacc.yy - for GRANT/REVOKE to work
|
|
|
|
|
|
|
|
Important: the enum should contain only single-bit values.
|
|
|
|
In this case, debuggers print bit combinations in the readable form:
|
|
|
|
(gdb) p (privilege_t) (15)
|
|
|
|
$8 = (SELECT_ACL | INSERT_ACL | UPDATE_ACL | DELETE_ACL)
|
|
|
|
|
|
|
|
Bit-OR combinations of the above values should be declared outside!
|
2020-02-09 21:53:11 +04:00
|
|
|
*/
|
|
|
|
};
|
|
|
|
|
2020-11-16 14:31:44 +05:30
|
|
|
constexpr static inline privilege_t ALL_KNOWN_BITS(privilege_t x)
|
|
|
|
{
|
|
|
|
return (privilege_t)(x | (x-1));
|
|
|
|
}
|
2020-02-09 21:53:11 +04:00
|
|
|
|
2020-02-28 21:59:01 +04:00
|
|
|
// Version markers
|
|
|
|
constexpr privilege_t LAST_100304_ACL= DELETE_HISTORY_ACL;
|
2020-03-18 20:15:53 +04:00
|
|
|
constexpr privilege_t LAST_100502_ACL= BINLOG_REPLAY_ACL;
|
2020-11-16 23:10:53 +05:30
|
|
|
constexpr privilege_t LAST_100508_ACL= SLAVE_MONITOR_ACL;
|
2023-09-04 13:04:06 +02:00
|
|
|
constexpr privilege_t LAST_110300_ACL= SHOW_CREATE_ROUTINE_ACL;
|
2020-02-28 21:59:01 +04:00
|
|
|
|
|
|
|
// Current version markers
|
2023-09-04 13:04:06 +02:00
|
|
|
constexpr privilege_t LAST_CURRENT_ACL= LAST_110300_ACL;
|
2020-02-28 21:59:01 +04:00
|
|
|
constexpr uint PRIVILEGE_T_MAX_BIT=
|
|
|
|
my_bit_log2_uint64((ulonglong) LAST_CURRENT_ACL);
|
|
|
|
|
|
|
|
static_assert((privilege_t)(1ULL << PRIVILEGE_T_MAX_BIT) == LAST_CURRENT_ACL,
|
|
|
|
"Something went fatally badly: "
|
|
|
|
"LAST_CURRENT_ACL and PRIVILEGE_T_MAX_BIT do not match");
|
|
|
|
|
|
|
|
// A combination of all bits defined in 10.3.4 (and earlier)
|
2020-11-16 14:31:44 +05:30
|
|
|
constexpr privilege_t ALL_KNOWN_ACL_100304 = ALL_KNOWN_BITS(LAST_100304_ACL);
|
2020-02-28 21:59:01 +04:00
|
|
|
|
|
|
|
// A combination of all bits defined in 10.5.2
|
2020-11-16 14:31:44 +05:30
|
|
|
constexpr privilege_t ALL_KNOWN_ACL_100502= ALL_KNOWN_BITS(LAST_100502_ACL);
|
|
|
|
|
2020-11-16 23:10:53 +05:30
|
|
|
// A combination of all bits defined in 10.5.8
|
|
|
|
constexpr privilege_t ALL_KNOWN_ACL_100508= ALL_KNOWN_BITS(LAST_100508_ACL);
|
2021-04-21 12:51:39 +02:00
|
|
|
// unfortunately, SLAVE_MONITOR_ACL was added in 10.5.9, but also in 10.5.8-5
|
|
|
|
// let's stay compatible with that branch too.
|
|
|
|
constexpr privilege_t ALL_KNOWN_ACL_100509= ALL_KNOWN_ACL_100508;
|
2020-02-28 21:59:01 +04:00
|
|
|
|
2023-09-04 13:04:06 +02:00
|
|
|
// A combination of all bits defined in 11.3.0
|
2024-02-29 18:16:06 +01:00
|
|
|
constexpr privilege_t ALL_KNOWN_ACL_110300= ALL_KNOWN_BITS(LAST_110300_ACL);
|
2023-09-04 13:04:06 +02:00
|
|
|
|
2020-02-28 21:59:01 +04:00
|
|
|
// A combination of all bits defined as of the current version
|
2020-11-16 14:31:44 +05:30
|
|
|
constexpr privilege_t ALL_KNOWN_ACL= ALL_KNOWN_BITS(LAST_CURRENT_ACL);
|
2020-02-12 18:26:18 +04:00
|
|
|
|
|
|
|
|
2020-02-09 21:53:11 +04:00
|
|
|
// Unary operators
|
|
|
|
static inline constexpr ulonglong operator~(privilege_t access)
|
|
|
|
{
|
|
|
|
return ~static_cast<ulonglong>(access);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
Comparison operators.
|
|
|
|
Delete automatic conversion between to/from integer types as much as possible.
|
|
|
|
This forces to use `(priv == NO_ACL)` instead of `(priv == 0)`.
|
|
|
|
|
|
|
|
Note: these operators will be gone when we change privilege_t to
|
|
|
|
"enum class privilege_t". See comments above.
|
|
|
|
*/
|
|
|
|
static inline bool operator==(privilege_t, ulonglong)= delete;
|
|
|
|
static inline bool operator==(privilege_t, ulong)= delete;
|
|
|
|
static inline bool operator==(privilege_t, uint)= delete;
|
|
|
|
static inline bool operator==(privilege_t, uchar)= delete;
|
|
|
|
static inline bool operator==(privilege_t, longlong)= delete;
|
|
|
|
static inline bool operator==(privilege_t, long)= delete;
|
|
|
|
static inline bool operator==(privilege_t, int)= delete;
|
|
|
|
static inline bool operator==(privilege_t, char)= delete;
|
|
|
|
static inline bool operator==(privilege_t, bool)= delete;
|
|
|
|
|
|
|
|
static inline bool operator==(ulonglong, privilege_t)= delete;
|
|
|
|
static inline bool operator==(ulong, privilege_t)= delete;
|
|
|
|
static inline bool operator==(uint, privilege_t)= delete;
|
|
|
|
static inline bool operator==(uchar, privilege_t)= delete;
|
|
|
|
static inline bool operator==(longlong, privilege_t)= delete;
|
|
|
|
static inline bool operator==(long, privilege_t)= delete;
|
|
|
|
static inline bool operator==(int, privilege_t)= delete;
|
|
|
|
static inline bool operator==(char, privilege_t)= delete;
|
|
|
|
static inline bool operator==(bool, privilege_t)= delete;
|
|
|
|
|
|
|
|
static inline bool operator!=(privilege_t, ulonglong)= delete;
|
|
|
|
static inline bool operator!=(privilege_t, ulong)= delete;
|
|
|
|
static inline bool operator!=(privilege_t, uint)= delete;
|
|
|
|
static inline bool operator!=(privilege_t, uchar)= delete;
|
|
|
|
static inline bool operator!=(privilege_t, longlong)= delete;
|
|
|
|
static inline bool operator!=(privilege_t, long)= delete;
|
|
|
|
static inline bool operator!=(privilege_t, int)= delete;
|
|
|
|
static inline bool operator!=(privilege_t, char)= delete;
|
|
|
|
static inline bool operator!=(privilege_t, bool)= delete;
|
|
|
|
|
|
|
|
static inline bool operator!=(ulonglong, privilege_t)= delete;
|
|
|
|
static inline bool operator!=(ulong, privilege_t)= delete;
|
|
|
|
static inline bool operator!=(uint, privilege_t)= delete;
|
|
|
|
static inline bool operator!=(uchar, privilege_t)= delete;
|
|
|
|
static inline bool operator!=(longlong, privilege_t)= delete;
|
|
|
|
static inline bool operator!=(long, privilege_t)= delete;
|
|
|
|
static inline bool operator!=(int, privilege_t)= delete;
|
|
|
|
static inline bool operator!=(char, privilege_t)= delete;
|
|
|
|
static inline bool operator!=(bool, privilege_t)= delete;
|
|
|
|
|
|
|
|
|
|
|
|
// Dyadic bitwise operators
|
|
|
|
static inline constexpr privilege_t operator&(privilege_t a, privilege_t b)
|
|
|
|
{
|
|
|
|
return static_cast<privilege_t>(static_cast<ulonglong>(a) &
|
|
|
|
static_cast<ulonglong>(b));
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline constexpr privilege_t operator&(ulonglong a, privilege_t b)
|
|
|
|
{
|
|
|
|
return static_cast<privilege_t>(a & static_cast<ulonglong>(b));
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline constexpr privilege_t operator&(privilege_t a, ulonglong b)
|
|
|
|
{
|
|
|
|
return static_cast<privilege_t>(static_cast<ulonglong>(a) & b);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline constexpr privilege_t operator|(privilege_t a, privilege_t b)
|
|
|
|
{
|
|
|
|
return static_cast<privilege_t>(static_cast<ulonglong>(a) |
|
|
|
|
static_cast<ulonglong>(b));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Dyadyc bitwise assignment operators
|
|
|
|
static inline privilege_t& operator&=(privilege_t &a, privilege_t b)
|
|
|
|
{
|
|
|
|
return a= a & b;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline privilege_t& operator&=(privilege_t &a, ulonglong b)
|
|
|
|
{
|
|
|
|
return a= a & b;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline privilege_t& operator|=(privilege_t &a, privilege_t b)
|
|
|
|
{
|
|
|
|
return a= a | b;
|
|
|
|
}
|
|
|
|
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
/*
|
|
|
|
A combination of all privileges that SUPER used to allow before 10.11.0
|
|
|
|
*/
|
|
|
|
constexpr privilege_t ALLOWED_BY_SUPER_BEFORE_101100= READ_ONLY_ADMIN_ACL;
|
2020-02-09 21:53:11 +04:00
|
|
|
|
2020-02-28 21:59:01 +04: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.
2022-12-10 12:08:31 +01:00
|
|
|
A combination of all privileges that SUPER used to allow before 11.0.0
|
2020-02-28 21:59:01 +04: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.
2022-12-10 12:08:31 +01:00
|
|
|
constexpr privilege_t ALLOWED_BY_SUPER_BEFORE_110000=
|
2020-02-28 21:59:01 +04:00
|
|
|
SET_USER_ACL |
|
|
|
|
FEDERATED_ADMIN_ACL |
|
|
|
|
CONNECTION_ADMIN_ACL |
|
|
|
|
REPL_SLAVE_ADMIN_ACL |
|
2020-03-18 20:15:53 +04:00
|
|
|
BINLOG_ADMIN_ACL |
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
BINLOG_REPLAY_ACL |
|
|
|
|
SLAVE_MONITOR_ACL |
|
|
|
|
BINLOG_MONITOR_ACL |
|
|
|
|
REPL_MASTER_ADMIN_ACL;
|
2020-02-09 21:53:11 +04:00
|
|
|
|
|
|
|
constexpr privilege_t COL_DML_ACLS=
|
|
|
|
SELECT_ACL | INSERT_ACL | UPDATE_ACL | DELETE_ACL;
|
|
|
|
|
|
|
|
constexpr privilege_t VIEW_ACLS=
|
|
|
|
CREATE_VIEW_ACL | SHOW_VIEW_ACL;
|
|
|
|
|
|
|
|
constexpr privilege_t STD_TABLE_DDL_ACLS=
|
|
|
|
CREATE_ACL | DROP_ACL | ALTER_ACL;
|
|
|
|
|
|
|
|
constexpr privilege_t ALL_TABLE_DDL_ACLS=
|
|
|
|
STD_TABLE_DDL_ACLS | INDEX_ACL;
|
|
|
|
|
|
|
|
constexpr privilege_t COL_ACLS=
|
|
|
|
SELECT_ACL | INSERT_ACL | UPDATE_ACL | REFERENCES_ACL;
|
|
|
|
|
|
|
|
constexpr privilege_t PROC_DDL_ACLS=
|
|
|
|
CREATE_PROC_ACL | ALTER_PROC_ACL;
|
|
|
|
|
2023-09-04 13:04:06 +02:00
|
|
|
constexpr privilege_t SHOW_PROC_WITHOUT_DEFINITION_ACLS=
|
2020-02-09 21:53:11 +04:00
|
|
|
PROC_DDL_ACLS | EXECUTE_ACL;
|
|
|
|
|
2023-11-16 16:54:16 +07:00
|
|
|
/*
|
|
|
|
When changing this, don't forget to update tables_priv
|
|
|
|
at scripts/mariadb_system_tables.sql, scripts/mariadb_system_tables_fix.sql
|
|
|
|
and scripts/sys_schema/i_s/table_privileges.sql
|
|
|
|
*/
|
2020-02-09 21:53:11 +04:00
|
|
|
constexpr privilege_t TABLE_ACLS=
|
|
|
|
COL_DML_ACLS | ALL_TABLE_DDL_ACLS | VIEW_ACLS |
|
|
|
|
GRANT_ACL | REFERENCES_ACL |
|
|
|
|
TRIGGER_ACL | DELETE_HISTORY_ACL;
|
|
|
|
|
|
|
|
constexpr privilege_t DB_ACLS=
|
|
|
|
TABLE_ACLS | PROC_DDL_ACLS | EXECUTE_ACL |
|
2023-09-04 13:04:06 +02:00
|
|
|
CREATE_TMP_ACL | LOCK_TABLES_ACL | EVENT_ACL | SHOW_CREATE_ROUTINE_ACL;
|
2020-02-09 21:53:11 +04:00
|
|
|
|
|
|
|
constexpr privilege_t PROC_ACLS=
|
2023-09-04 13:04:06 +02:00
|
|
|
ALTER_PROC_ACL | EXECUTE_ACL | GRANT_ACL | SHOW_CREATE_ROUTINE_ACL;
|
2020-02-09 21:53:11 +04:00
|
|
|
|
|
|
|
constexpr privilege_t GLOBAL_ACLS=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
DB_ACLS | SHOW_DB_ACL | CREATE_USER_ACL | CREATE_TABLESPACE_ACL |
|
2020-02-09 21:53:11 +04:00
|
|
|
SUPER_ACL | RELOAD_ACL | SHUTDOWN_ACL | PROCESS_ACL | FILE_ACL |
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ACL |
|
|
|
|
ALLOWED_BY_SUPER_BEFORE_101100 | ALLOWED_BY_SUPER_BEFORE_110000;
|
2020-02-09 21:53:11 +04:00
|
|
|
|
|
|
|
constexpr privilege_t DEFAULT_CREATE_PROC_ACLS=
|
|
|
|
ALTER_PROC_ACL | EXECUTE_ACL;
|
|
|
|
|
|
|
|
constexpr privilege_t SHOW_CREATE_TABLE_ACLS=
|
|
|
|
COL_DML_ACLS | ALL_TABLE_DDL_ACLS |
|
|
|
|
TRIGGER_ACL | REFERENCES_ACL | GRANT_ACL | VIEW_ACLS;
|
|
|
|
|
|
|
|
/**
|
|
|
|
Table-level privileges which are automatically "granted" to everyone on
|
|
|
|
existing temporary tables (CREATE_ACL is necessary for ALTER ... RENAME).
|
|
|
|
*/
|
|
|
|
constexpr privilege_t TMP_TABLE_ACLS=
|
2022-10-25 11:26:37 +03:00
|
|
|
COL_DML_ACLS | ALL_TABLE_DDL_ACLS | REFERENCES_ACL;
|
2020-02-09 21:53:11 +04:00
|
|
|
|
2020-02-28 21:59:01 +04:00
|
|
|
|
2021-07-02 00:05:27 +02:00
|
|
|
constexpr privilege_t PRIV_LOCK_TABLES= SELECT_ACL | LOCK_TABLES_ACL;
|
2020-02-28 21:59:01 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
Allow to set an object definer:
|
|
|
|
CREATE DEFINER=xxx {TRIGGER|VIEW|FUNCTION|PROCEDURE}
|
|
|
|
Was SUPER prior to 10.5.2
|
|
|
|
*/
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
constexpr privilege_t PRIV_DEFINER_CLAUSE= SET_USER_ACL;
|
2020-02-28 21:59:01 +04:00
|
|
|
/*
|
|
|
|
If a VIEW has a `definer=invoker@host` clause and
|
|
|
|
the specified definer does not exists, then
|
|
|
|
- The invoker with REVEAL_MISSING_DEFINER_ACL gets:
|
|
|
|
ERROR: The user specified as a definer ('definer1'@'localhost') doesn't exist
|
|
|
|
- The invoker without MISSING_DEFINER_ACL gets a generic access error,
|
|
|
|
without revealing details that the definer does not exists.
|
|
|
|
|
|
|
|
TODO: we should eventually test the same privilege when processing
|
|
|
|
other objects that have the DEFINER clause (e.g. routines, triggers).
|
|
|
|
Currently the missing definer is revealed for non-privileged invokers
|
|
|
|
in case of routines, triggers, etc.
|
|
|
|
|
|
|
|
Was SUPER prior to 10.5.2
|
|
|
|
*/
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
constexpr privilege_t PRIV_REVEAL_MISSING_DEFINER= SET_USER_ACL;
|
2020-02-28 21:59:01 +04:00
|
|
|
|
|
|
|
/* Actions that require only the SUPER privilege */
|
|
|
|
constexpr privilege_t PRIV_DES_DECRYPT_ONE_ARG= SUPER_ACL;
|
|
|
|
constexpr privilege_t PRIV_LOG_BIN_TRUSTED_SP_CREATOR= SUPER_ACL;
|
|
|
|
constexpr privilege_t PRIV_DEBUG= SUPER_ACL;
|
|
|
|
constexpr privilege_t PRIV_SET_GLOBAL_SYSTEM_VARIABLE= SUPER_ACL;
|
|
|
|
constexpr privilege_t PRIV_SET_RESTRICTED_SESSION_SYSTEM_VARIABLE= SUPER_ACL;
|
|
|
|
|
2020-03-17 11:08:00 +04:00
|
|
|
/* The following variables respected only SUPER_ACL prior to 10.5.2 */
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_VAR_BINLOG_FORMAT=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
BINLOG_ADMIN_ACL;
|
2020-03-17 19:08:28 +04:00
|
|
|
|
2020-03-17 11:08:00 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_VAR_BINLOG_DIRECT_NON_TRANSACTIONAL_UPDATES=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
BINLOG_ADMIN_ACL;
|
2020-03-17 19:08:28 +04:00
|
|
|
|
2020-03-18 12:50:17 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_VAR_BINLOG_ANNOTATE_ROW_EVENTS=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
BINLOG_ADMIN_ACL;
|
2020-03-18 12:50:17 +04:00
|
|
|
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_VAR_BINLOG_ROW_IMAGE=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
BINLOG_ADMIN_ACL;
|
2020-03-18 12:50:17 +04:00
|
|
|
|
2020-03-17 11:08:00 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_VAR_SQL_LOG_BIN=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
BINLOG_ADMIN_ACL;
|
2020-03-17 11:08:00 +04:00
|
|
|
|
2020-03-17 19:08:28 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_BINLOG_CACHE_SIZE=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
BINLOG_ADMIN_ACL;
|
2020-03-17 19:08:28 +04:00
|
|
|
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_BINLOG_FILE_CACHE_SIZE=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
BINLOG_ADMIN_ACL;
|
2020-03-17 19:08:28 +04:00
|
|
|
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_BINLOG_STMT_CACHE_SIZE=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
BINLOG_ADMIN_ACL;
|
2020-03-17 19:08:28 +04:00
|
|
|
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_BINLOG_COMMIT_WAIT_COUNT=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
BINLOG_ADMIN_ACL;
|
2020-03-17 19:08:28 +04:00
|
|
|
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_BINLOG_COMMIT_WAIT_USEC=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
BINLOG_ADMIN_ACL;
|
2020-03-17 19:08:28 +04:00
|
|
|
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_BINLOG_ROW_METADATA=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
BINLOG_ADMIN_ACL;
|
2020-03-17 19:08:28 +04:00
|
|
|
|
MDEV-31273: Precompute binlog checksums
Compute binlog checksums (when enabled) already when writing events
into the statement or transaction caches, where before it was done
when the caches are copied to the real binlog file. This moves the
checksum computation outside of holding LOCK_log, improving
scalabitily.
At stmt/trx cache write time, the final end_log_pos values are not
known, so with this patch these will be set to 0. Events that are
written directly to the binlog file (not through stmt/trx cache) keep
the correct end_log_pos value. The GTID and COMMIT/XID events at the
start and end of event groups are written directly, so the zero
end_log_pos is only for events in the middle of event groups, which
do not negatively affect replication.
An option --binlog-legacy-event-pos, off by default, is provided to
disable this behavior to provide backwards compatibility with any
external applications that might rely on end_log_pos in events in the
middle of event groups.
Checksums cannot be pre-computed when binlog encryption is enabled, as
encryption relies on correct end_log_pos to provide part of the
nonce/IV.
Checksum pre-computation is also disabled for WSREP/Galera, as it uses
events differently in its write-sets and so on. Extending pre-computation of
checksums to Galera where it makes sense could be added in a future patch.
The current --binlog-checksum configuration is saved in
binlog_cache_data at transaction start and used to pre-compute
checksums in cache, if applicable. When the cache is later copied to
the binlog, a check is made if the saved value still matches the
configured global value; if so, the events are block-copied directly
into the binlog file. If --binlog-checksum was changed during the
transaction, events are re-written to the binlog file one-by-one and
the checksums recomputed/discarded as appropriate.
Reviewed-by: Monty <monty@mariadb.org>
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2023-06-13 11:41:44 +02:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_BINLOG_LEGACY_EVENT_POS=
|
|
|
|
SUPER_ACL | BINLOG_ADMIN_ACL;
|
|
|
|
|
2023-09-08 13:12:49 +02:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_BINLOG_GTID_INDEX=
|
|
|
|
BINLOG_ADMIN_ACL;
|
|
|
|
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_BINLOG_GTID_INDEX_PAGE_SIZE=
|
|
|
|
BINLOG_ADMIN_ACL;
|
|
|
|
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_BINLOG_GTID_INDEX_SPAN_MIN=
|
|
|
|
BINLOG_ADMIN_ACL;
|
|
|
|
|
2020-03-17 19:08:28 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_EXPIRE_LOGS_DAYS=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
BINLOG_ADMIN_ACL;
|
2020-03-17 19:08:28 +04:00
|
|
|
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_LOG_BIN_COMPRESS=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
BINLOG_ADMIN_ACL;
|
2020-03-17 19:08:28 +04:00
|
|
|
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_LOG_BIN_COMPRESS_MIN_LEN=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
BINLOG_ADMIN_ACL;
|
2020-03-17 19:08:28 +04:00
|
|
|
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_LOG_BIN_TRUST_FUNCTION_CREATORS=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
BINLOG_ADMIN_ACL;
|
2020-03-17 19:08:28 +04:00
|
|
|
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_MAX_BINLOG_CACHE_SIZE=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
BINLOG_ADMIN_ACL;
|
2020-03-17 19:08:28 +04:00
|
|
|
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_MAX_BINLOG_STMT_CACHE_SIZE=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
BINLOG_ADMIN_ACL;
|
2020-03-17 19:08:28 +04:00
|
|
|
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_MAX_BINLOG_SIZE=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
BINLOG_ADMIN_ACL;
|
2020-03-17 19:08:28 +04:00
|
|
|
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_SYNC_BINLOG=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
BINLOG_ADMIN_ACL;
|
2020-03-17 19:08:28 +04:00
|
|
|
|
2020-03-17 11:08:00 +04:00
|
|
|
|
2020-02-28 21:59:01 +04:00
|
|
|
/* Privileges related to --read-only */
|
2020-03-17 11:49:38 +04:00
|
|
|
// Was super prior to 10.5.2
|
2022-09-21 19:16:33 +03:00
|
|
|
constexpr privilege_t PRIV_IGNORE_READ_ONLY= READ_ONLY_ADMIN_ACL;
|
2020-03-17 11:49:38 +04:00
|
|
|
// Was super prior to 10.5.2
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_READ_ONLY= READ_ONLY_ADMIN_ACL;
|
2020-02-28 21:59:01 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
Privileges related to connection handling.
|
|
|
|
*/
|
|
|
|
// Was SUPER_ACL prior to 10.5.2
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
constexpr privilege_t PRIV_IGNORE_INIT_CONNECT= CONNECTION_ADMIN_ACL;
|
2020-02-28 21:59:01 +04:00
|
|
|
// Was SUPER_ACL prior to 10.5.2
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
constexpr privilege_t PRIV_IGNORE_MAX_USER_CONNECTIONS= CONNECTION_ADMIN_ACL;
|
2020-02-28 21:59:01 +04:00
|
|
|
// Was SUPER_ACL prior to 10.5.2
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
constexpr privilege_t PRIV_IGNORE_MAX_CONNECTIONS= CONNECTION_ADMIN_ACL;
|
2020-02-28 21:59:01 +04:00
|
|
|
// Was SUPER_ACL prior to 10.5.2
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
constexpr privilege_t PRIV_IGNORE_MAX_PASSWORD_ERRORS= CONNECTION_ADMIN_ACL;
|
2020-02-28 21:59:01 +04:00
|
|
|
// Was SUPER_ACL prior to 10.5.2
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
constexpr privilege_t PRIV_KILL_OTHER_USER_PROCESS= CONNECTION_ADMIN_ACL;
|
2020-02-28 21:59:01 +04:00
|
|
|
|
2020-03-17 14:27:52 +04:00
|
|
|
// Was SUPER_ACL prior to 10.5.2
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_CONNECT_TIMEOUT=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
CONNECTION_ADMIN_ACL;
|
2020-03-17 14:27:52 +04:00
|
|
|
// Was SUPER_ACL prior to 10.5.2
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_DISCONNECT_ON_EXPIRED_PASSWORD=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
CONNECTION_ADMIN_ACL;
|
2020-03-17 14:27:52 +04:00
|
|
|
// Was SUPER_ACL prior to 10.5.2
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_EXTRA_MAX_CONNECTIONS=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
CONNECTION_ADMIN_ACL;
|
2020-03-17 14:27:52 +04:00
|
|
|
// Was SUPER_ACL prior to 10.5.2
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_INIT_CONNECT=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
CONNECTION_ADMIN_ACL;
|
2020-03-17 14:27:52 +04:00
|
|
|
// Was SUPER_ACL prior to 10.5.2
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_MAX_CONNECTIONS=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
CONNECTION_ADMIN_ACL;
|
2020-03-17 14:27:52 +04:00
|
|
|
// Was SUPER_ACL prior to 10.5.2
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_MAX_CONNECT_ERRORS=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
CONNECTION_ADMIN_ACL;
|
2020-03-17 14:27:52 +04:00
|
|
|
// Was SUPER_ACL prior to 10.5.2
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_MAX_PASSWORD_ERRORS=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
CONNECTION_ADMIN_ACL;
|
2020-03-17 14:27:52 +04:00
|
|
|
// Was SUPER_ACL prior to 10.5.2
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_PROXY_PROTOCOL_NETWORKS=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
CONNECTION_ADMIN_ACL;
|
2020-03-17 14:27:52 +04:00
|
|
|
// Was SUPER_ACL prior to 10.5.2
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_SECURE_AUTH=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
CONNECTION_ADMIN_ACL;
|
2020-03-17 14:27:52 +04:00
|
|
|
// Was SUPER_ACL prior to 10.5.2
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_SLOW_LAUNCH_TIME=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
CONNECTION_ADMIN_ACL;
|
2020-03-17 14:27:52 +04:00
|
|
|
|
|
|
|
// Was SUPER_ACL prior to 10.5.2
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_THREAD_POOL=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
CONNECTION_ADMIN_ACL;
|
2020-03-17 14:27:52 +04:00
|
|
|
|
2020-02-28 21:59:01 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
Binary log related privileges that are checked regardless
|
|
|
|
of active replication running.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
This command was renamed from "SHOW MASTER STATUS"
|
|
|
|
to "SHOW BINLOG STATUS" in 10.5.2.
|
|
|
|
Was SUPER_ACL | REPL_CLIENT_ACL prior to 10.5.2
|
|
|
|
REPL_CLIENT_ACL was renamed to BINLOG_MONITOR_ACL.
|
|
|
|
*/
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
constexpr privilege_t PRIV_STMT_SHOW_BINLOG_STATUS= BINLOG_MONITOR_ACL;
|
2020-02-28 21:59:01 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
Was SUPER_ACL | REPL_CLIENT_ACL prior to 10.5.2
|
|
|
|
REPL_CLIENT_ACL was renamed to BINLOG_MONITOR_ACL.
|
|
|
|
*/
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
constexpr privilege_t PRIV_STMT_SHOW_BINARY_LOGS= BINLOG_MONITOR_ACL;
|
2020-02-28 21:59:01 +04:00
|
|
|
|
|
|
|
// Was SUPER_ACL prior to 10.5.2
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
constexpr privilege_t PRIV_STMT_PURGE_BINLOG= BINLOG_ADMIN_ACL;
|
2020-02-28 21:59:01 +04:00
|
|
|
|
|
|
|
// Was REPL_SLAVE_ACL prior to 10.5.2
|
|
|
|
constexpr privilege_t PRIV_STMT_SHOW_BINLOG_EVENTS= BINLOG_MONITOR_ACL;
|
|
|
|
|
MDEV-30188: Ensure all binlog* variables are visible as system variables
Turn the remaining three `binlog*` options binlog_do_db, binlog_ignore_db,
binlog_rows_event_max_size into global variables so that they can be
visible from the SQL user level. This is for audit / secure
configuration check purposes.
Create new MTR tests to make sure that the newly created global
variables can be visible from the command line interface.
Behavior before the code change:
MariaDB [(none)]> SHOW GLOBAL VARIABLES WHERE
-> Variable_name LIKE 'binlog_do_db' OR
-> Variable_name LIKE 'binlog_ignore_db' OR
-> Variable_name LIKE 'binlog_row_event_max_size';
Empty set (0.001 sec)
Behavior after the code change:
MariaDB [(none)]> SHOW GLOBAL VARIABLES WHERE
-> Variable_name LIKE 'binlog_do_db' OR
-> Variable_name LIKE 'binlog_ignore_db' OR
-> Variable_name LIKE 'binlog_row_event_max_size';
+---------------------------+-------+
| Variable_name | Value |
+---------------------------+-------+
| binlog_do_db | |
| binlog_ignore_db | |
| binlog_row_event_max_size | 8192 |
+---------------------------+-------+
3 rows in set (0.001 sec)
Note:
For `binlog_do_db` and `binlog_ignore_db`, we add a new class
`Sys_var_binlog_filter` to handle the dynamically-composable command line
options for `binlog_do_db` and `binlog_ignore_db`. Below
is the motivation:
When the users start the server with the option
--binlog-do-db="database1" --binlog-do-db="database2"
The expected behavior is that the system should allow replication for
both `database1` and `database2`, which is the logic of the original
code.
However, when turning the variables into system variables, the
functionality does not exist any more, since system variables will only
handle the last occurrence of the option, and in this case, the system
will only be able to handle `database2`.
Copyright:
All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the BSD-new
license. I am contributing on behalf of my employer Amazon Web Services, Inc.
2023-03-17 16:34:10 +00:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_BINLOG_DO_DB = BINLOG_ADMIN_ACL | SUPER_ACL;
|
|
|
|
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_BINLOG_IGNORE_DB = BINLOG_ADMIN_ACL | SUPER_ACL;
|
2020-02-28 21:59:01 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
Privileges for replication related statements and commands
|
|
|
|
that are executed on the master.
|
|
|
|
*/
|
|
|
|
constexpr privilege_t PRIV_COM_REGISTER_SLAVE= REPL_SLAVE_ACL;
|
|
|
|
constexpr privilege_t PRIV_COM_BINLOG_DUMP= REPL_SLAVE_ACL;
|
|
|
|
// Was REPL_SLAVE_ACL prior to 10.5.2
|
|
|
|
constexpr privilege_t PRIV_STMT_SHOW_SLAVE_HOSTS= REPL_MASTER_ADMIN_ACL;
|
|
|
|
|
2020-03-18 10:36:06 +04:00
|
|
|
/*
|
|
|
|
Replication master related variable privileges.
|
|
|
|
Where SUPER prior to 10.5.2
|
|
|
|
*/
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_RPL_SEMI_SYNC_MASTER_ENABLED=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_MASTER_ADMIN_ACL;
|
2020-03-18 10:36:06 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_RPL_SEMI_SYNC_MASTER_TIMEOUT=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_MASTER_ADMIN_ACL;
|
2020-03-18 10:36:06 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_RPL_SEMI_SYNC_MASTER_WAIT_NO_SLAVE=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_MASTER_ADMIN_ACL;
|
2020-03-18 10:36:06 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_RPL_SEMI_SYNC_MASTER_TRACE_LEVEL=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_MASTER_ADMIN_ACL;
|
2020-03-18 10:36:06 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_RPL_SEMI_SYNC_MASTER_WAIT_POINT=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_MASTER_ADMIN_ACL;
|
2020-03-18 10:36:06 +04:00
|
|
|
|
2020-03-18 13:27:38 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_MASTER_VERIFY_CHECKSUM=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_MASTER_ADMIN_ACL;
|
2020-03-18 13:27:38 +04:00
|
|
|
|
2020-03-18 17:14:07 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_GTID_BINLOG_STATE=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_MASTER_ADMIN_ACL;
|
2020-03-18 17:14:07 +04:00
|
|
|
|
2020-03-18 20:15:53 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_SERVER_ID=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_MASTER_ADMIN_ACL;
|
2020-03-18 20:15:53 +04:00
|
|
|
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_GTID_DOMAIN_ID=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_MASTER_ADMIN_ACL;
|
2020-03-18 20:15:53 +04:00
|
|
|
|
2020-02-28 21:59:01 +04:00
|
|
|
|
|
|
|
/* Privileges for statements that are executed on the slave */
|
|
|
|
// Was SUPER_ACL prior to 10.5.2
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
constexpr privilege_t PRIV_STMT_START_SLAVE= REPL_SLAVE_ADMIN_ACL;
|
2020-02-28 21:59:01 +04:00
|
|
|
// Was SUPER_ACL prior to 10.5.2
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
constexpr privilege_t PRIV_STMT_STOP_SLAVE= REPL_SLAVE_ADMIN_ACL;
|
2020-02-28 21:59:01 +04:00
|
|
|
// Was SUPER_ACL prior to 10.5.2
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
constexpr privilege_t PRIV_STMT_CHANGE_MASTER= REPL_SLAVE_ADMIN_ACL;
|
2020-02-28 21:59:01 +04:00
|
|
|
// Was (SUPER_ACL | REPL_CLIENT_ACL) prior to 10.5.2
|
2020-11-16 23:10:53 +05:30
|
|
|
// Was (SUPER_ACL | REPL_SLAVE_ADMIN_ACL) from 10.5.2 to 10.5.7
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
constexpr privilege_t PRIV_STMT_SHOW_SLAVE_STATUS= SLAVE_MONITOR_ACL;
|
2020-02-28 21:59:01 +04:00
|
|
|
// Was REPL_SLAVE_ACL prior to 10.5.2
|
2020-11-16 23:10:53 +05:30
|
|
|
// Was REPL_SLAVE_ADMIN_ACL from 10.5.2 to 10.5.7
|
2020-11-16 14:31:44 +05:30
|
|
|
constexpr privilege_t PRIV_STMT_SHOW_RELAYLOG_EVENTS= SLAVE_MONITOR_ACL;
|
2020-02-28 21:59:01 +04:00
|
|
|
|
2020-03-18 20:15:53 +04:00
|
|
|
/*
|
|
|
|
Privileges related to binlog replying.
|
|
|
|
Were SUPER_ACL prior to 10.5.2
|
|
|
|
*/
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
constexpr privilege_t PRIV_STMT_BINLOG= BINLOG_REPLAY_ACL;
|
2020-03-18 20:15:53 +04:00
|
|
|
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_SESSION_VAR_GTID_SEQ_NO=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
BINLOG_REPLAY_ACL;
|
2020-03-18 20:15:53 +04:00
|
|
|
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_SESSION_VAR_PSEUDO_THREAD_ID=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
BINLOG_REPLAY_ACL;
|
2020-03-18 20:15:53 +04:00
|
|
|
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_SESSION_VAR_SERVER_ID=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
BINLOG_REPLAY_ACL;
|
2020-03-18 20:15:53 +04:00
|
|
|
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_SESSION_VAR_GTID_DOMAIN_ID=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
BINLOG_REPLAY_ACL;
|
2020-02-28 21:59:01 +04:00
|
|
|
|
2020-03-18 07:02:15 +04:00
|
|
|
/*
|
|
|
|
Privileges for slave related global variables.
|
|
|
|
Were SUPER prior to 10.5.2.
|
|
|
|
*/
|
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_REPLICATE_EVENTS_MARKED_FOR_SKIP=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2022-08-09 13:50:12 +02:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_REPLICATE_REWRITE_DB=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 07:02:15 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_REPLICATE_DO_DB=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 07:02:15 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_REPLICATE_DO_TABLE=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 07:02:15 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_REPLICATE_IGNORE_DB=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 07:02:15 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_REPLICATE_IGNORE_TABLE=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 07:02:15 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_REPLICATE_WILD_DO_TABLE=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 07:02:15 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_REPLICATE_WILD_IGNORE_TABLE=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 07:02:15 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_READ_BINLOG_SPEED_LIMIT=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 07:02:15 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_COMPRESSED_PROTOCOL=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 07:02:15 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_DDL_EXEC_MODE=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 07:02:15 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_DOMAIN_PARALLEL_THREADS=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 07:02:15 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_EXEC_MODE=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 07:02:15 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_MAX_ALLOWED_PACKET=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2022-06-27 12:29:10 -06:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_MAX_STATEMENT_TIME=
|
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 07:02:15 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_NET_TIMEOUT=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 07:02:15 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_PARALLEL_MAX_QUEUED=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 07:02:15 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_PARALLEL_MODE=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 07:02:15 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_PARALLEL_THREADS=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 07:02:15 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_PARALLEL_WORKERS=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 07:02:15 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_RUN_TRIGGERS_FOR_RBR=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 07:02:15 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_SQL_VERIFY_CHECKSUM=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 07:02:15 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_TRANSACTION_RETRY_INTERVAL=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 07:02:15 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_SLAVE_TYPE_CONVERSIONS=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 07:02:15 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_INIT_SLAVE=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 07:02:15 +04:00
|
|
|
|
2020-03-18 10:36:06 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_RPL_SEMI_SYNC_SLAVE_ENABLED=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 10:36:06 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_RPL_SEMI_SYNC_SLAVE_TRACE_LEVEL=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 10:36:06 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_RPL_SEMI_SYNC_SLAVE_DELAY_MASTER=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 10:36:06 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_RPL_SEMI_SYNC_SLAVE_KILL_CONN_TIMEOUT=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 10:36:06 +04:00
|
|
|
|
2020-03-18 11:52:11 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_RELAY_LOG_PURGE=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 11:52:11 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_RELAY_LOG_RECOVERY=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 11:52:11 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_SYNC_MASTER_INFO=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 11:52:11 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_SYNC_RELAY_LOG=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 11:52:11 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_SYNC_RELAY_LOG_INFO=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 11:52:11 +04:00
|
|
|
|
2020-03-18 17:14:07 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_GTID_CLEANUP_BATCH_SIZE=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 17:14:07 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_GTID_IGNORE_DUPLICATES=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 17:14:07 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_GTID_POS_AUTO_ENGINES=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 17:14:07 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_GTID_SLAVE_POS=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 17:14:07 +04:00
|
|
|
constexpr privilege_t PRIV_SET_SYSTEM_GLOBAL_VAR_GTID_STRICT_MODE=
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
REPL_SLAVE_ADMIN_ACL;
|
2020-03-18 17:14:07 +04:00
|
|
|
|
2020-03-18 07:02:15 +04:00
|
|
|
|
2020-02-28 21:59:01 +04:00
|
|
|
/* Privileges for federated database related statements */
|
|
|
|
// Was SUPER_ACL prior to 10.5.2
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
constexpr privilege_t PRIV_STMT_CREATE_SERVER= FEDERATED_ADMIN_ACL;
|
2020-02-28 21:59:01 +04:00
|
|
|
// Was SUPER_ACL prior to 10.5.2
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
constexpr privilege_t PRIV_STMT_ALTER_SERVER= FEDERATED_ADMIN_ACL;
|
2020-02-28 21:59:01 +04:00
|
|
|
// Was SUPER_ACL prior to 10.5.2
|
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.
2022-12-10 12:08:31 +01:00
|
|
|
constexpr privilege_t PRIV_STMT_DROP_SERVER= FEDERATED_ADMIN_ACL;
|
2020-02-28 21:59:01 +04:00
|
|
|
|
|
|
|
|
|
|
|
/* Privileges related to processes */
|
|
|
|
constexpr privilege_t PRIV_COM_PROCESS_INFO= PROCESS_ACL;
|
2021-12-24 17:27:03 +03:00
|
|
|
// This privilege applies both for SHOW EXPLAIN and SHOW ANALYZE
|
2020-02-28 21:59:01 +04:00
|
|
|
constexpr privilege_t PRIV_STMT_SHOW_EXPLAIN= PROCESS_ACL;
|
|
|
|
constexpr privilege_t PRIV_STMT_SHOW_ENGINE_STATUS= PROCESS_ACL;
|
|
|
|
constexpr privilege_t PRIV_STMT_SHOW_ENGINE_MUTEX= PROCESS_ACL;
|
|
|
|
constexpr privilege_t PRIV_STMT_SHOW_PROCESSLIST= PROCESS_ACL;
|
|
|
|
|
|
|
|
|
2020-02-09 21:53:11 +04:00
|
|
|
/*
|
|
|
|
Defines to change the above bits to how things are stored in tables
|
|
|
|
This is needed as the 'host' and 'db' table is missing a few privileges
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Privileges that need to be reallocated (in continous chunks) */
|
|
|
|
constexpr privilege_t DB_CHUNK0 (COL_DML_ACLS | CREATE_ACL | DROP_ACL);
|
|
|
|
constexpr privilege_t DB_CHUNK1 (GRANT_ACL | REFERENCES_ACL | INDEX_ACL | ALTER_ACL);
|
|
|
|
constexpr privilege_t DB_CHUNK2 (CREATE_TMP_ACL | LOCK_TABLES_ACL);
|
|
|
|
constexpr privilege_t DB_CHUNK3 (VIEW_ACLS | PROC_DDL_ACLS);
|
|
|
|
constexpr privilege_t DB_CHUNK4 (EXECUTE_ACL);
|
|
|
|
constexpr privilege_t DB_CHUNK5 (EVENT_ACL | TRIGGER_ACL);
|
|
|
|
constexpr privilege_t DB_CHUNK6 (DELETE_HISTORY_ACL);
|
2023-09-04 13:04:06 +02:00
|
|
|
constexpr privilege_t DB_CHUNK7 (SHOW_CREATE_ROUTINE_ACL);
|
2020-02-09 21:53:11 +04:00
|
|
|
|
|
|
|
|
|
|
|
static inline privilege_t fix_rights_for_db(privilege_t access)
|
|
|
|
{
|
|
|
|
ulonglong A(access);
|
|
|
|
return static_cast<privilege_t>
|
|
|
|
(((A) & DB_CHUNK0) |
|
|
|
|
((A << 4) & DB_CHUNK1) |
|
|
|
|
((A << 6) & DB_CHUNK2) |
|
|
|
|
((A << 9) & DB_CHUNK3) |
|
|
|
|
((A << 2) & DB_CHUNK4) |
|
|
|
|
((A << 9) & DB_CHUNK5) |
|
2023-09-04 13:04:06 +02:00
|
|
|
((A << 10) & DB_CHUNK6) |
|
|
|
|
((A << 19) & DB_CHUNK7));
|
2020-02-09 21:53:11 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
static inline privilege_t get_rights_for_db(privilege_t access)
|
|
|
|
{
|
|
|
|
ulonglong A(access);
|
|
|
|
return static_cast<privilege_t>
|
|
|
|
((A & DB_CHUNK0) |
|
|
|
|
((A & DB_CHUNK1) >> 4) |
|
|
|
|
((A & DB_CHUNK2) >> 6) |
|
|
|
|
((A & DB_CHUNK3) >> 9) |
|
|
|
|
((A & DB_CHUNK4) >> 2) |
|
|
|
|
((A & DB_CHUNK5) >> 9) |
|
2023-09-04 13:04:06 +02:00
|
|
|
((A & DB_CHUNK6) >> 10) |
|
|
|
|
((A & DB_CHUNK7) >> 19));
|
2020-02-09 21:53:11 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#define TBL_CHUNK0 DB_CHUNK0
|
|
|
|
#define TBL_CHUNK1 DB_CHUNK1
|
|
|
|
#define TBL_CHUNK2 (CREATE_VIEW_ACL | SHOW_VIEW_ACL)
|
|
|
|
#define TBL_CHUNK3 TRIGGER_ACL
|
|
|
|
#define TBL_CHUNK4 (DELETE_HISTORY_ACL)
|
|
|
|
|
|
|
|
|
|
|
|
static inline privilege_t fix_rights_for_table(privilege_t access)
|
|
|
|
{
|
|
|
|
ulonglong A(access);
|
|
|
|
return static_cast<privilege_t>
|
|
|
|
((A & TBL_CHUNK0) |
|
|
|
|
((A << 4) & TBL_CHUNK1) |
|
|
|
|
((A << 11) & TBL_CHUNK2) |
|
|
|
|
((A << 15) & TBL_CHUNK3) |
|
|
|
|
((A << 16) & TBL_CHUNK4));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static inline privilege_t get_rights_for_table(privilege_t access)
|
|
|
|
{
|
|
|
|
ulonglong A(access);
|
|
|
|
return static_cast<privilege_t>
|
|
|
|
((A & TBL_CHUNK0) |
|
|
|
|
((A & TBL_CHUNK1) >> 4) |
|
|
|
|
((A & TBL_CHUNK2) >> 11) |
|
|
|
|
((A & TBL_CHUNK3) >> 15) |
|
|
|
|
((A & TBL_CHUNK4) >> 16));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static inline privilege_t fix_rights_for_column(privilege_t A)
|
|
|
|
{
|
|
|
|
const ulonglong mask(SELECT_ACL | INSERT_ACL | UPDATE_ACL);
|
|
|
|
return (A & mask) | static_cast<privilege_t>((A & ~mask) << 8);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static inline privilege_t get_rights_for_column(privilege_t A)
|
|
|
|
{
|
|
|
|
const ulonglong mask(SELECT_ACL | INSERT_ACL | UPDATE_ACL);
|
|
|
|
return static_cast<privilege_t>((static_cast<ulonglong>(A) & mask) |
|
|
|
|
(static_cast<ulonglong>(A) >> 8));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static inline privilege_t fix_rights_for_procedure(privilege_t access)
|
|
|
|
{
|
|
|
|
ulonglong A(access);
|
|
|
|
return static_cast<privilege_t>
|
2023-09-04 13:04:06 +02:00
|
|
|
(((A << 35) & SHOW_CREATE_ROUTINE_ACL) |
|
|
|
|
((A << 18) & EXECUTE_ACL) |
|
|
|
|
((A << 23) & ALTER_PROC_ACL) |
|
|
|
|
((A << 8) & GRANT_ACL));
|
2020-02-09 21:53:11 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static inline privilege_t get_rights_for_procedure(privilege_t access)
|
|
|
|
{
|
|
|
|
ulonglong A(access);
|
|
|
|
return static_cast<privilege_t>
|
2023-09-04 13:04:06 +02:00
|
|
|
(((A & SHOW_CREATE_ROUTINE_ACL) >> 35) |
|
|
|
|
((A & EXECUTE_ACL) >> 18) |
|
|
|
|
((A & ALTER_PROC_ACL) >> 23) |
|
|
|
|
((A & GRANT_ACL) >> 8));
|
2020-02-09 21:53:11 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* PRIVILEGE_H_INCLUDED */
|