MXS-2220 Change server name to constant string
This commit is contained in:
@ -649,7 +649,7 @@ int gssapi_auth_load_users(Listener* listener)
|
||||
if (mxs_mysql_query(mysql, gssapi_users_query))
|
||||
{
|
||||
MXS_ERROR("Failed to query server '%s' for GSSAPI users: %s",
|
||||
servers->server->name,
|
||||
servers->server->name(),
|
||||
mysql_error(mysql));
|
||||
}
|
||||
else
|
||||
|
@ -107,7 +107,7 @@ bool extract_principal_name(DCB* dcb, GWBUF* buffer)
|
||||
* it's possible that the server authenticated us as the anonymous user. This
|
||||
* means that the server is not secure. */
|
||||
MXS_ERROR("Server '%s' returned an unexpected authentication response.%s",
|
||||
dcb->server->name,
|
||||
dcb->server->name(),
|
||||
databuf[0] == MYSQL_REPLY_OK ?
|
||||
" Authentication was complete before it even started, "
|
||||
"anonymous users might not be disabled." : "");
|
||||
|
@ -884,7 +884,7 @@ static bool check_server_permissions(SERVICE* service,
|
||||
MXS_ERROR("[%s] Failed to connect to server '%s' ([%s]:%d) when"
|
||||
" checking authentication user credentials and permissions: %d %s",
|
||||
service->name,
|
||||
server->name,
|
||||
server->name(),
|
||||
server->address,
|
||||
server->port,
|
||||
my_errno,
|
||||
@ -1146,7 +1146,7 @@ int get_users_from_server(MYSQL* con, SERVER_REF* server_ref, SERVICE* service,
|
||||
|
||||
if (!rv)
|
||||
{
|
||||
MXS_ERROR("Failed to load users from server '%s': %s", server->name, mysql_error(con));
|
||||
MXS_ERROR("Failed to load users from server '%s': %s", server->name(), mysql_error(con));
|
||||
}
|
||||
|
||||
MXS_FREE(query);
|
||||
|
@ -208,7 +208,7 @@ int PamInstance::load_users(SERVICE* service)
|
||||
if (mysql_query(mysql, PAM_USERS_QUERY))
|
||||
{
|
||||
MXS_ERROR("Failed to query server '%s' for PAM users: '%s'.",
|
||||
servers->server->name,
|
||||
servers->server->name(),
|
||||
mysql_error(mysql));
|
||||
}
|
||||
else
|
||||
@ -319,7 +319,7 @@ bool PamInstance::query_anon_proxy_user(SERVER* server, MYSQL* conn)
|
||||
if (mysql_query(conn, ANON_USER_QUERY))
|
||||
{
|
||||
MXS_ERROR("Failed to query server '%s' for the anonymous PAM user: '%s'.",
|
||||
server->name,
|
||||
server->name(),
|
||||
mysql_error(conn));
|
||||
success = false;
|
||||
}
|
||||
@ -346,7 +346,7 @@ bool PamInstance::query_anon_proxy_user(SERVER* server, MYSQL* conn)
|
||||
if (mysql_query(conn, ANON_GRANT_QUERY))
|
||||
{
|
||||
MXS_ERROR("Failed to query server '%s' for the grants of the anonymous PAM user: '%s'.",
|
||||
server->name,
|
||||
server->name(),
|
||||
mysql_error(conn));
|
||||
success = false;
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ bool check_auth_switch_request(DCB* dcb, GWBUF* buffer)
|
||||
bool was_ok_packet = copied > MYSQL_HEADER_LEN
|
||||
&& data[MYSQL_HEADER_LEN + 1] == MYSQL_REPLY_OK;
|
||||
MXS_ERROR("Server '%s' returned an unexpected authentication response.%s",
|
||||
dcb->server->name,
|
||||
dcb->server->name(),
|
||||
was_ok_packet ?
|
||||
" Authentication was complete before it even started, "
|
||||
"anonymous users might not be disabled." : "");
|
||||
@ -124,7 +124,7 @@ bool PamBackendSession::extract(DCB* dcb, GWBUF* buffer)
|
||||
if (mxs_mysql_is_ok_packet(buffer))
|
||||
{
|
||||
MXS_DEBUG("pam_backend_auth_extract received ok packet from '%s'.",
|
||||
dcb->server->name);
|
||||
dcb->server->name());
|
||||
m_state = PAM_AUTH_OK;
|
||||
rval = true;
|
||||
}
|
||||
@ -138,7 +138,7 @@ bool PamBackendSession::extract(DCB* dcb, GWBUF* buffer)
|
||||
if (!rval)
|
||||
{
|
||||
MXS_DEBUG("pam_backend_auth_extract to backend '%s' failed for user '%s'.",
|
||||
dcb->server->name,
|
||||
dcb->server->name(),
|
||||
dcb->user);
|
||||
}
|
||||
return rval;
|
||||
@ -151,7 +151,7 @@ int PamBackendSession::authenticate(DCB* dcb)
|
||||
if (m_state == PAM_AUTH_INIT)
|
||||
{
|
||||
MXS_DEBUG("pam_backend_auth_authenticate sending password to '%s'.",
|
||||
dcb->server->name);
|
||||
dcb->server->name());
|
||||
if (send_client_password(dcb))
|
||||
{
|
||||
rval = MXS_AUTH_INCOMPLETE;
|
||||
|
Reference in New Issue
Block a user