MCPcopy Create free account
hub / github.com/Tencent/phxsql / secure_auth

Function secure_auth

phx_percona/percona/sql/sql_acl.cc:9967–9993  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9965}
9966
9967static bool secure_auth(MPVIO_EXT *mpvio)
9968{
9969 THD *thd;
9970 if (!opt_secure_auth)
9971 return 0;
9972 /*
9973 If the server is running in secure auth mode, short scrambles are
9974 forbidden. Extra juggling to report the same error as the old code.
9975 */
9976
9977 thd= current_thd;
9978 if (mpvio->client_capabilities & CLIENT_PROTOCOL_41)
9979 {
9980 my_error(ER_SERVER_IS_IN_SECURE_AUTH_MODE, MYF(0),
9981 mpvio->auth_info.user_name,
9982 mpvio->auth_info.host_or_ip);
9983 general_log_print(thd, COM_CONNECT, ER(ER_SERVER_IS_IN_SECURE_AUTH_MODE),
9984 mpvio->auth_info.user_name,
9985 mpvio->auth_info.host_or_ip);
9986 }
9987 else
9988 {
9989 my_error(ER_NOT_SUPPORTED_AUTH_MODE, MYF(0));
9990 general_log_print(thd, COM_CONNECT, ER(ER_NOT_SUPPORTED_AUTH_MODE));
9991 }
9992 return 1;
9993}
9994
9995/**
9996 sends a "change plugin" packet, requesting a client to restart authentication

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected