Merge branch '2.2' into 2.3

This commit is contained in:
Markus Mäkelä
2019-01-03 09:21:47 +02:00
14 changed files with 235 additions and 148 deletions

View File

@ -162,7 +162,8 @@ static char* get_users_query(const char* server_version, int version, bool inclu
{
if (is_mariadb) // 10.1.1 or newer, supports default roles
{
return version >= 100202 ?
// Require 10.2.15 due to MDEV-15840 and MDEV-15556
return version >= 100215 ?
get_mariadb_102_users_query(include_root) :
get_mariadb_users_query(include_root);
}

View File

@ -285,9 +285,9 @@ static bool is_localhost_address(struct sockaddr_storage* addr)
*/
static int mysql_auth_authenticate(DCB* dcb)
{
int auth_ret = ssl_authenticate_check_status(dcb);
int auth_ret = MXS_AUTH_SSL_COMPLETE;
MYSQL_session* client_data = (MYSQL_session*)dcb->data;
if (auth_ret == MXS_AUTH_SSL_COMPLETE && *client_data->user)
if (*client_data->user)
{
MXS_DEBUG("Receiving connection from '%s' to database '%s'.",
client_data->user,

View File

@ -332,9 +332,9 @@ Buffer PamClientSession::create_auth_change_packet() const
int PamClientSession::authenticate(DCB* dcb)
{
int rval = ssl_authenticate_check_status(dcb);
int rval = MXS_AUTH_SSL_COMPLETE;
MYSQL_session* ses = static_cast<MYSQL_session*>(dcb->data);
if (rval == MXS_AUTH_SSL_COMPLETE && *ses->user)
if (*ses->user)
{
rval = MXS_AUTH_FAILED;
if (m_state == PAM_AUTH_INIT)