mirror of
https://gitee.com/wangbin579/cetus.git
synced 2024-12-03 12:27:42 +08:00
compatible with mysql5.1 authentication
This commit is contained in:
parent
03be84bcdc
commit
913b6a8987
@ -200,7 +200,9 @@ NETWORK_MYSQLD_PLUGIN_PROTO(server_read_auth)
|
||||
#endif
|
||||
con->client->response = auth;
|
||||
|
||||
if (g_strcmp0(auth->auth_plugin_name->str, "mysql_native_password") != 0) {
|
||||
if ((auth->client_capabilities & CLIENT_PLUGIN_AUTH)
|
||||
&& (g_strcmp0(auth->auth_plugin_name->str, "mysql_native_password") != 0))
|
||||
{
|
||||
GString *packet = g_string_new(0);
|
||||
network_mysqld_proto_append_auth_switch(packet, "mysql_native_password",
|
||||
con->client->challenge->auth_plugin_data);
|
||||
|
@ -99,7 +99,8 @@ typedef struct {
|
||||
#define COMPATIBLE_BASIC_FLAGS (CLIENT_BASIC_FLAGS \
|
||||
|CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA \
|
||||
|CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS \
|
||||
|CLIENT_SESSION_TRACK)
|
||||
|CLIENT_SESSION_TRACK \
|
||||
|CLIENT_PLUGIN_AUTH)
|
||||
#else
|
||||
#define COMPATIBLE_BASIC_FLAGS CLIENT_BASIC_FLAGS
|
||||
#endif
|
||||
|
@ -159,7 +159,9 @@ do_read_auth(network_mysqld_con *con, GHashTable *allow_ip_table, GHashTable *de
|
||||
|
||||
con->client->response = auth;
|
||||
|
||||
if (g_strcmp0(auth->auth_plugin_name->str, "mysql_native_password") != 0) {
|
||||
if ((auth->client_capabilities & CLIENT_PLUGIN_AUTH)
|
||||
&& (g_strcmp0(auth->auth_plugin_name->str, "mysql_native_password") != 0))
|
||||
{
|
||||
GString *packet = g_string_new(0);
|
||||
network_mysqld_proto_append_auth_switch(packet, "mysql_native_password",
|
||||
con->client->challenge->auth_plugin_data);
|
||||
|
Loading…
Reference in New Issue
Block a user