mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
91a4a8aba6
When installing plugins, there is a missing check for slash (/) in the path on Windows. Note that on Windows, both / and \ can be used to separate directories. This patch fixes the issue by: - Adding a FN_DIRSEP symbol for all platforms consisting of a string of legal directory separators. - Adding a charset-aware version of strcspn(). - Adding a check_valid_path() function that uses my_strcspn() to check if any FN_DIRSEP character is in the supplied string. - Using the check_valid_path() function in sql_plugin.cc and sql_udf.cc (which means replacing the existing test there).
12 lines
474 B
Text
12 lines
474 B
Text
#
|
|
# Bug#51770: UNINSTALL PLUGIN requires no privileges
|
|
#
|
|
GRANT INSERT ON mysql.plugin TO bug51770@localhost;
|
|
INSTALL PLUGIN example SONAME 'ha_example.so';
|
|
UNINSTALL PLUGIN example;
|
|
ERROR 42000: DELETE command denied to user 'bug51770'@'localhost' for table 'plugin'
|
|
GRANT DELETE ON mysql.plugin TO bug51770@localhost;
|
|
UNINSTALL PLUGIN example;
|
|
DROP USER bug51770@localhost;
|
|
INSTALL PLUGIN example SONAME '../ha_example.so';
|
|
ERROR HY000: No paths allowed for shared library
|