mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
move authentication_windows_client and mysql_clear_password clear client auth plugins
out of libmysql into separate dynamic plugins in the plugin/ directory. move dialog and auth_socket plugins out of the plugin directory with examples into dedicated directories in plugin/
This commit is contained in:
@@ -2272,7 +2272,6 @@ typedef struct st_mysql_client_plugin_AUTHENTICATION auth_plugin_t;
|
||||
static int client_mpvio_write_packet(struct st_plugin_vio*, const uchar*, int);
|
||||
static int native_password_auth_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql);
|
||||
static int old_password_auth_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql);
|
||||
static int clear_password_auth_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql);
|
||||
|
||||
static auth_plugin_t native_password_client_plugin=
|
||||
{
|
||||
@@ -2306,39 +2305,13 @@ static auth_plugin_t old_password_client_plugin=
|
||||
old_password_auth_client
|
||||
};
|
||||
|
||||
static auth_plugin_t clear_password_client_plugin=
|
||||
{
|
||||
MYSQL_CLIENT_AUTHENTICATION_PLUGIN,
|
||||
MYSQL_CLIENT_AUTHENTICATION_PLUGIN_INTERFACE_VERSION,
|
||||
"mysql_clear_password",
|
||||
"Georgi Kodinov",
|
||||
"Clear password authentication plugin",
|
||||
{0,1,0},
|
||||
"GPL",
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
clear_password_auth_client
|
||||
};
|
||||
|
||||
#ifdef AUTHENTICATION_WIN
|
||||
extern auth_plugin_t win_auth_client_plugin;
|
||||
#endif
|
||||
|
||||
struct st_mysql_client_plugin *mysql_client_builtins[]=
|
||||
{
|
||||
(struct st_mysql_client_plugin *)&native_password_client_plugin,
|
||||
(struct st_mysql_client_plugin *)&old_password_client_plugin,
|
||||
(struct st_mysql_client_plugin *)&clear_password_client_plugin,
|
||||
#ifdef AUTHENTICATION_WIN
|
||||
(struct st_mysql_client_plugin *)&win_auth_client_plugin,
|
||||
#endif
|
||||
0
|
||||
};
|
||||
|
||||
|
||||
|
||||
/* this is a "superset" of MYSQL_PLUGIN_VIO, in C++ I use inheritance */
|
||||
typedef struct {
|
||||
int (*read_packet)(struct st_plugin_vio *vio, uchar **buf);
|
||||
@@ -4342,18 +4315,3 @@ static int old_password_auth_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql)
|
||||
DBUG_RETURN(CR_OK);
|
||||
}
|
||||
|
||||
/**
|
||||
The main function of the mysql_clear_password authentication plugin.
|
||||
*/
|
||||
|
||||
static int clear_password_auth_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql)
|
||||
{
|
||||
int res;
|
||||
|
||||
/* send password in clear text */
|
||||
res= vio->write_packet(vio, (const unsigned char *) mysql->passwd,
|
||||
strlen(mysql->passwd) + 1);
|
||||
|
||||
return res ? CR_ERROR : CR_OK;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user