mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 03:47:17 +02:00
Bug#37428 Potential security issue with UDFs - linux shellcode execution.
plugin_dir option backported from 5.1 mysql-test/r/udf.result: result fix sql/mysql_priv.h: opt_plugin_dir and opt_plugin_dir_ptr declared. sql/mysqld.cc: 'plugin_dir' option added sql/set_var.cc: 'plugin_dir' option added. sql/sql_udf.cc: opt_plugin_dir added to the udf->dl path. Warn if it's not specified. sql/unireg.h: PLUGINDIR defined.
This commit is contained in:
parent
de73b72954
commit
c546559a62
6 changed files with 47 additions and 3 deletions
|
|
@ -1,5 +1,7 @@
|
|||
drop table if exists t1;
|
||||
CREATE FUNCTION metaphon RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
|
||||
Warnings:
|
||||
Warning 1105 plugin_dir was not specified
|
||||
CREATE FUNCTION myfunc_double RETURNS REAL SONAME "UDF_EXAMPLE_LIB";
|
||||
CREATE FUNCTION myfunc_nonexist RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB";
|
||||
ERROR HY000: Can't find function 'myfunc_nonexist' in library
|
||||
|
|
@ -197,6 +199,8 @@ DROP FUNCTION avgcost;
|
|||
select * from mysql.func;
|
||||
name ret dl type
|
||||
CREATE FUNCTION is_const RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
|
||||
Warnings:
|
||||
Warning 1105 plugin_dir was not specified
|
||||
select IS_const(3);
|
||||
IS_const(3)
|
||||
const
|
||||
|
|
@ -206,6 +210,8 @@ name ret dl type
|
|||
select is_const(3);
|
||||
ERROR 42000: FUNCTION test.is_const does not exist
|
||||
CREATE FUNCTION is_const RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
|
||||
Warnings:
|
||||
Warning 1105 plugin_dir was not specified
|
||||
select
|
||||
is_const(3) as const,
|
||||
is_const(3.14) as const,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue