From 6d48dfae996cc3d78efd757d81ef2f89a6f72d99 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 6 Feb 2012 20:28:56 +0100 Subject: [PATCH] move --secure-file-priv from hardcoded to a template. remove redundant suite.opt --- mysql-test/README.suites | 1 + mysql-test/include/default_mysqld.cnf | 1 + mysql-test/lib/My/ConfigFactory.pm | 9 --------- mysql-test/suite/funcs_1/t/suite.opt | 2 -- 4 files changed, 2 insertions(+), 11 deletions(-) delete mode 100644 mysql-test/suite/funcs_1/t/suite.opt diff --git a/mysql-test/README.suites b/mysql-test/README.suites index 41b38df58b5..d458983b383 100644 --- a/mysql-test/README.suites +++ b/mysql-test/README.suites @@ -124,6 +124,7 @@ and values - with templating extensions. They are to values in the [ENV] group of my.cnf file. Via the OPT group one can refer to special values: + @OPT.plugindir - a path to plugindir @OPT.vardir - a path to vardir @OPT.port - a new port number is reserved out of the pool. It will not match any other port number used by this test run. diff --git a/mysql-test/include/default_mysqld.cnf b/mysql-test/include/default_mysqld.cnf index 4eb758ce520..06830dce669 100644 --- a/mysql-test/include/default_mysqld.cnf +++ b/mysql-test/include/default_mysqld.cnf @@ -24,6 +24,7 @@ character-set-server= latin1 connect-timeout= 60 plugin-dir=@OPT.plugindir +secure-file-priv= @OPT.vardir log-basename=mysqld debug-no-sync diff --git a/mysql-test/lib/My/ConfigFactory.pm b/mysql-test/lib/My/ConfigFactory.pm index 73bad5bd81d..3e6221f5e4c 100644 --- a/mysql-test/lib/My/ConfigFactory.pm +++ b/mysql-test/lib/My/ConfigFactory.pm @@ -165,13 +165,6 @@ sub fix_log_slow_queries { return "$dir/mysqld-slow.log"; } -sub fix_secure_file_priv { - my ($self)= @_; - my $vardir= $self->{ARGS}->{vardir}; - # By default, prevent the started mysqld to access files outside of vardir - return $vardir; -} - sub fix_std_data { my ($self, $config, $group_name, $group)= @_; my $testdir= $self->get_testdir($group); @@ -244,8 +237,6 @@ my @mysqld_rules= { '#user' => sub { return shift->{ARGS}->{user} || ""; } }, { '#password' => sub { return shift->{ARGS}->{password} || ""; } }, { 'server-id' => \&fix_server_id, }, - # By default, prevent the started mysqld to access files outside of vardir - { 'secure-file-priv' => sub { return shift->{ARGS}->{vardir}; } }, { 'ssl-ca' => \&fix_ssl_ca }, { 'ssl-cert' => \&fix_ssl_server_cert }, { 'ssl-key' => \&fix_ssl_server_key }, diff --git a/mysql-test/suite/funcs_1/t/suite.opt b/mysql-test/suite/funcs_1/t/suite.opt deleted file mode 100644 index 20780bf0619..00000000000 --- a/mysql-test/suite/funcs_1/t/suite.opt +++ /dev/null @@ -1,2 +0,0 @@ ---secure-file-priv=$MYSQLTEST_VARDIR -