summaryrefslogtreecommitdiff
path: root/plugin/disks/information_schema_disks.cc
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/disks/information_schema_disks.cc')
-rw-r--r--plugin/disks/information_schema_disks.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/plugin/disks/information_schema_disks.cc b/plugin/disks/information_schema_disks.cc
index 54dbb25b101..9b1b6c0fe69 100644
--- a/plugin/disks/information_schema_disks.cc
+++ b/plugin/disks/information_schema_disks.cc
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2017, MariaDB
+ Copyright (c) 2017, 2019, MariaDB
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
@@ -20,6 +20,7 @@
#include <mntent.h>
#include <sql_class.h>
#include <table.h>
+#include <sql_acl.h> /* check_global_access() */
bool schema_table_store_record(THD *thd, TABLE *table);
@@ -84,6 +85,9 @@ int disks_fill_table(THD* pThd, TABLE_LIST* pTables, Item* pCond)
int rv = 1;
TABLE* pTable = pTables->table;
+ if (check_global_access(pThd, FILE_ACL, true))
+ return 0;
+
FILE* pFile = setmntent("/etc/mtab", "r");
if (pFile)
@@ -145,11 +149,11 @@ maria_declare_plugin(disks)
PLUGIN_LICENSE_GPL, /* license type */
disks_table_init, /* init function */
NULL, /* deinit function */
- 0x0100, /* version = 1.0 */
+ 0x0101, /* version = 1.1 */
NULL, /* no status variables */
NULL, /* no system variables */
- "1.0", /* String version representation */
- MariaDB_PLUGIN_MATURITY_GAMMA /* Maturity (see include/mysql/plugin.h)*/
+ "1.1", /* String version representation */
+ MariaDB_PLUGIN_MATURITY_STABLE /* Maturity (see include/mysql/plugin.h)*/
}
mysql_declare_plugin_end;