summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorNuno Carvalho <nuno.carvalho@oracle.com>2012-04-18 10:08:01 +0100
committerNuno Carvalho <nuno.carvalho@oracle.com>2012-04-18 10:08:01 +0100
commit448c3d627542c835ac7ea1851e8e019596e377fd (patch)
tree411895204bed71e4eaba444d79403351b185c7d1 /sql/sql_parse.cc
parent25f82f8a261963f633ccfdabce27dfc1e0309286 (diff)
downloadmariadb-git-448c3d627542c835ac7ea1851e8e019596e377fd.tar.gz
WL#6236: Allow SHOW MASTER LOGS and SHOW BINARY LOGS with REPLICATION CLIENT
Currently SHOW MASTER LOGS and SHOW BINARY LOGS require the SUPER privilege. Monitoring tools (such as MEM) often want to check this output - for instance MEM generates the SUM of the sizes of the logs reported here, and puts that in the Replication overview within the MEM Dashboard. However, because of the SUPER requirement, these tools often have an account that holds open the connection whilst monitoring, and can lock out administrators when the server gets overloaded and reaches max_connections - there is already another SUPER privileged account connected, the "monitor". As SHOW MASTER STATUS, and all other replication related statements, return with either REPLICATION CLIENT or SUPER privileges, this worklog is to make SHOW MASTER LOGS and SHOW BINARY LOGS be consistent with this as well, and allow both of these commands with either SUPER or REPLICATION CLIENT. This allows monitoring tools to not require a SUPER privilege any more, so is safer in overloaded situations, as well as being more secure, as lighter privileges can be given to users of such tools or scripts.
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 0f190809ab9..14b778328d2 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -3057,7 +3057,7 @@ end_with_restore_list:
goto error;
#else
{
- if (check_global_access(thd, SUPER_ACL))
+ if (check_global_access(thd, SUPER_ACL | REPL_CLIENT_ACL))
goto error;
res = show_binlogs(thd);
break;