mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
WL#1054: Pluggable authentication support
Merged the implementation to a new base tree.
This commit is contained in:
@ -126,6 +126,9 @@ my $path_vardir_trace; # unix formatted opt_vardir for trace files
|
||||
my $opt_tmpdir; # Path to use for tmp/ dir
|
||||
my $opt_tmpdir_pid;
|
||||
|
||||
my $auth_filename; # the name of the authentication test plugin
|
||||
my $auth_plugin; # the path to the authentication test plugin
|
||||
|
||||
END {
|
||||
if ( defined $opt_tmpdir_pid and $opt_tmpdir_pid == $$ )
|
||||
{
|
||||
@ -1025,6 +1028,22 @@ sub command_line_setup {
|
||||
"$basedir/sql/share/charsets",
|
||||
"$basedir/share/charsets");
|
||||
|
||||
# Look for client test plugin
|
||||
if (IS_WINDOWS)
|
||||
{
|
||||
$auth_filename = "auth_test_plugin.dll";
|
||||
}
|
||||
else
|
||||
{
|
||||
$auth_filename = "auth_test_plugin.so";
|
||||
}
|
||||
$auth_plugin=
|
||||
mtr_file_exists(vs_config_dirs('plugin/auth/',$auth_filename),
|
||||
"$basedir/plugin/auth/.libs/" . $auth_filename,
|
||||
"$basedir/lib/mysql/plugin/" . $auth_filename,
|
||||
"$basedir/lib/plugin/" . $auth_filename);
|
||||
|
||||
|
||||
if (using_extern())
|
||||
{
|
||||
# Connect to the running mysqld and find out what it supports
|
||||
@ -1896,6 +1915,24 @@ sub environment_setup {
|
||||
$ENV{'UDF_EXAMPLE_LIB_OPT'}= "--plugin-dir=".
|
||||
($lib_udf_example ? dirname($lib_udf_example) : "");
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Add the path where mysqld will find the auth test plugin (dialog.so/dll)
|
||||
# --------------------------------------------------------------------------
|
||||
if ($auth_plugin)
|
||||
{
|
||||
$ENV{'PLUGIN_AUTH'}= basename($auth_plugin);
|
||||
$ENV{'PLUGIN_AUTH_OPT'}= "--plugin-dir=".dirname($auth_plugin);
|
||||
|
||||
$ENV{'PLUGIN_AUTH_LOAD'}="--plugin_load=test_plugin_server=".$auth_filename;
|
||||
}
|
||||
else
|
||||
{
|
||||
$ENV{'PLUGIN_AUTH'}= "";
|
||||
$ENV{'PLUGIN_AUTH_OPT'}="--plugin-dir=";
|
||||
$ENV{'PLUGIN_AUTH_LOAD'}="";
|
||||
}
|
||||
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Add the path where mysqld will find ha_example.so
|
||||
# --------------------------------------------------------------------------
|
||||
@ -4918,6 +4955,10 @@ sub start_mysqltest ($) {
|
||||
mtr_add_arg($args, "--tmpdir=%s", $opt_tmpdir);
|
||||
mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir);
|
||||
mtr_add_arg($args, "--logdir=%s/log", $opt_vardir);
|
||||
if ($auth_plugin)
|
||||
{
|
||||
mtr_add_arg($args, "--plugin_dir=%s", dirname($auth_plugin));
|
||||
}
|
||||
|
||||
# Log line number and time for each line in .test file
|
||||
mtr_add_arg($args, "--mark-progress")
|
||||
|
Reference in New Issue
Block a user