summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-07-17 21:24:29 +0200
committerSergei Golubchik <sergii@pisem.net>2013-07-17 21:24:29 +0200
commit97e640b9ae83e07b444fceede6b0524256c7a3cc (patch)
tree8f48fbfaf88ea7895ce59fd3ac2fbe6184334387 /plugin
parent2f6a2494a5eb2cf3ab06fbedd2584eca85d90230 (diff)
parentc7973615e723b13c6457b494b72be2fac35bfd18 (diff)
downloadmariadb-git-97e640b9ae83e07b444fceede6b0524256c7a3cc.tar.gz
5.5 merge
Diffstat (limited to 'plugin')
-rw-r--r--plugin/auth_pam/auth_pam.c25
-rw-r--r--plugin/feedback/feedback.cc6
-rw-r--r--plugin/fulltext/plugin_example.c2
-rw-r--r--plugin/sql_errlog/sql_logger.cc4
-rw-r--r--plugin/win_auth_client/common.cc2
-rw-r--r--plugin/win_auth_client/common.h2
-rw-r--r--plugin/win_auth_client/handshake.cc2
-rw-r--r--plugin/win_auth_client/handshake.h2
-rw-r--r--plugin/win_auth_client/handshake_client.cc2
-rw-r--r--plugin/win_auth_client/log_client.cc2
-rw-r--r--plugin/win_auth_client/plugin_client.cc2
11 files changed, 41 insertions, 10 deletions
diff --git a/plugin/auth_pam/auth_pam.c b/plugin/auth_pam/auth_pam.c
index 4f549142e72..2a06b6a01a6 100644
--- a/plugin/auth_pam/auth_pam.c
+++ b/plugin/auth_pam/auth_pam.c
@@ -154,6 +154,27 @@ static struct st_mysql_auth info =
pam_auth
};
+static char use_cleartext_plugin;
+static MYSQL_SYSVAR_BOOL(use_cleartext_plugin, use_cleartext_plugin,
+ PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
+ "Use mysql_cleartext_plugin on the client side instead of the dialog "
+ "plugin. This may be needed for compatibility reasons, but it only "
+ "supports simple PAM policies that don't require anything besides "
+ "a password", NULL, NULL, 0);
+
+static struct st_mysql_sys_var* vars[] = {
+ MYSQL_SYSVAR(use_cleartext_plugin),
+ NULL
+};
+
+
+static int init(void *p __attribute__((unused)))
+{
+ if (use_cleartext_plugin)
+ info.client_auth_plugin= "mysql_clear_password";
+ return 0;
+}
+
maria_declare_plugin(pam)
{
MYSQL_AUTHENTICATION_PLUGIN,
@@ -162,11 +183,11 @@ maria_declare_plugin(pam)
"Sergei Golubchik",
"PAM based authentication",
PLUGIN_LICENSE_GPL,
- NULL,
+ init,
NULL,
0x0100,
NULL,
- NULL,
+ vars,
"1.0",
MariaDB_PLUGIN_MATURITY_BETA
}
diff --git a/plugin/feedback/feedback.cc b/plugin/feedback/feedback.cc
index f093fd4df25..9bf2fcb99bc 100644
--- a/plugin/feedback/feedback.cc
+++ b/plugin/feedback/feedback.cc
@@ -38,6 +38,7 @@ mysql_cond_t sleep_condition;
volatile bool shutdown_plugin;
static pthread_t sender_thread;
+#ifdef HAVE_PSI_INTERFACE
static PSI_mutex_key key_sleep_mutex;
static PSI_mutex_info mutex_list[]=
{{ &key_sleep_mutex, "sleep_mutex", PSI_FLAG_GLOBAL}};
@@ -49,6 +50,7 @@ static PSI_cond_info cond_list[]=
static PSI_thread_key key_sender_thread;
static PSI_thread_info thread_list[] =
{{&key_sender_thread, "sender_thread", 0}};
+#endif
Url **urls; ///< list of urls to send the report to
uint url_count;
@@ -231,8 +233,12 @@ static int init(void *p)
i_s_feedback->fill_table= fill_feedback; ///< how to fill the I_S table
i_s_feedback->idx_field1 = 0; ///< virtual index on the 1st col
+#ifdef HAVE_PSI_INTERFACE
#define PSI_register(X) \
if(PSI_server) PSI_server->register_ ## X("feedback", X ## _list, array_elements(X ## _list))
+#else
+#define PSI_register(X) /* no-op */
+#endif
PSI_register(mutex);
PSI_register(cond);
diff --git a/plugin/fulltext/plugin_example.c b/plugin/fulltext/plugin_example.c
index 2af3555393c..778918cb439 100644
--- a/plugin/fulltext/plugin_example.c
+++ b/plugin/fulltext/plugin_example.c
@@ -210,7 +210,7 @@ static struct st_mysql_ftparser simple_parser_descriptor=
static struct st_mysql_show_var simple_status[]=
{
- {"static", (char *)"just a static text", SHOW_CHAR},
+ {"A_static", (char *)"just a static text", SHOW_CHAR},
{"called", (char *)&number_of_calls, SHOW_LONG},
{0,0,0}
};
diff --git a/plugin/sql_errlog/sql_logger.cc b/plugin/sql_errlog/sql_logger.cc
index 8bf757f2fd7..dd6363d1448 100644
--- a/plugin/sql_errlog/sql_logger.cc
+++ b/plugin/sql_errlog/sql_logger.cc
@@ -21,10 +21,12 @@
extern MYSQL_PLUGIN_IMPORT char *mysql_data_home;
+#ifdef HAVE_PSI_INTERFACE
/* These belong to the service initialization */
static PSI_mutex_key key_LOCK_logger_service;
static PSI_mutex_info mutex_list[]=
{{ &key_LOCK_logger_service, "logger_service_file_st::lock", PSI_FLAG_GLOBAL}};
+#endif
typedef struct logger_handle_st {
File file;
@@ -188,7 +190,9 @@ int logger_printf(LOGGER_HANDLE *log, const char *fmt, ...)
void init_logger_mutexes()
{
+#ifdef HAVE_PSI_INTERFACE
if (PSI_server)
PSI_server->register_mutex("sql_logger", mutex_list, 1);
+#endif
}
diff --git a/plugin/win_auth_client/common.cc b/plugin/win_auth_client/common.cc
index 9544e7734f5..30a8e0b3b13 100644
--- a/plugin/win_auth_client/common.cc
+++ b/plugin/win_auth_client/common.cc
@@ -11,7 +11,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
#include "common.h"
#include <sddl.h> // for ConvertSidToStringSid()
diff --git a/plugin/win_auth_client/common.h b/plugin/win_auth_client/common.h
index 7f7aa1d2dff..415294b1ed9 100644
--- a/plugin/win_auth_client/common.h
+++ b/plugin/win_auth_client/common.h
@@ -11,7 +11,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
#ifndef COMMON_H
#define COMMON_H
diff --git a/plugin/win_auth_client/handshake.cc b/plugin/win_auth_client/handshake.cc
index ec665af9ef9..8e6af8408ae 100644
--- a/plugin/win_auth_client/handshake.cc
+++ b/plugin/win_auth_client/handshake.cc
@@ -11,7 +11,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
#include "handshake.h"
diff --git a/plugin/win_auth_client/handshake.h b/plugin/win_auth_client/handshake.h
index 5292948b583..adab4715c99 100644
--- a/plugin/win_auth_client/handshake.h
+++ b/plugin/win_auth_client/handshake.h
@@ -11,7 +11,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
#ifndef HANDSHAKE_H
#define HANDSHAKE_H
diff --git a/plugin/win_auth_client/handshake_client.cc b/plugin/win_auth_client/handshake_client.cc
index 609589e9ef4..e3435f19de6 100644
--- a/plugin/win_auth_client/handshake_client.cc
+++ b/plugin/win_auth_client/handshake_client.cc
@@ -11,7 +11,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
#include "handshake.h"
diff --git a/plugin/win_auth_client/log_client.cc b/plugin/win_auth_client/log_client.cc
index 8a49c4220bb..ec7210a8a97 100644
--- a/plugin/win_auth_client/log_client.cc
+++ b/plugin/win_auth_client/log_client.cc
@@ -11,7 +11,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
#include <my_global.h>
#include "common.h"
diff --git a/plugin/win_auth_client/plugin_client.cc b/plugin/win_auth_client/plugin_client.cc
index 30dc5b1493d..c7dcb92e62d 100644
--- a/plugin/win_auth_client/plugin_client.cc
+++ b/plugin/win_auth_client/plugin_client.cc
@@ -11,7 +11,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
#include <my_global.h>
#include <mysql.h>