Cleanup SERVER struct
Removed one unused field. Rearranged others, clarified comments.
This commit is contained in:
@ -622,7 +622,7 @@ int gssapi_auth_load_users(SERV_LISTENER *listener)
|
||||
if (mxs_mysql_query(mysql, gssapi_users_query))
|
||||
{
|
||||
MXS_ERROR("Failed to query server '%s' for GSSAPI users: %s",
|
||||
servers->server->unique_name, mysql_error(mysql));
|
||||
servers->server->name, mysql_error(mysql));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -150,7 +150,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->unique_name, databuf[0] == MYSQL_REPLY_OK ?
|
||||
dcb->server->name, databuf[0] == MYSQL_REPLY_OK ?
|
||||
" Authentication was complete before it even started, "
|
||||
"anonymous users might not be disabled." : "");
|
||||
return false;
|
||||
|
@ -519,7 +519,7 @@ static bool check_server_permissions(SERVICE *service, SERVER* server,
|
||||
|
||||
MXS_ERROR("[%s] Failed to connect to server '%s' ([%s]:%d) when"
|
||||
" checking authentication user credentials and permissions: %d %s",
|
||||
service->name, server->unique_name, server->name, server->port,
|
||||
service->name, server->name, server->address, server->port,
|
||||
my_errno, mysql_error(mysql));
|
||||
|
||||
mysql_close(mysql);
|
||||
@ -869,7 +869,7 @@ static int get_users(SERV_LISTENER *listener, bool skip_local)
|
||||
{
|
||||
MXS_ERROR("Failure loading users data from backend "
|
||||
"[%s:%i] for service [%s]. MySQL error %i, %s",
|
||||
server->server->name, server->server->port,
|
||||
server->server->address, server->server->port,
|
||||
service->name, mysql_errno(con), mysql_error(con));
|
||||
mysql_close(con);
|
||||
}
|
||||
|
@ -198,7 +198,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->unique_name, mysql_error(mysql));
|
||||
servers->server->name, mysql_error(mysql));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -305,7 +305,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->unique_name, mysql_error(conn));
|
||||
server->name, mysql_error(conn));
|
||||
success = false;
|
||||
}
|
||||
else
|
||||
@ -331,7 +331,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->unique_name, mysql_error(conn));
|
||||
server->name, mysql_error(conn));
|
||||
success = false;
|
||||
}
|
||||
else
|
||||
|
@ -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->unique_name, was_ok_packet ?
|
||||
dcb->server->name, was_ok_packet ?
|
||||
" Authentication was complete before it even started, "
|
||||
"anonymous users might not be disabled." : "");
|
||||
return false;
|
||||
@ -121,7 +121,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->unique_name);
|
||||
dcb->server->name);
|
||||
m_state = PAM_AUTH_OK;
|
||||
rval = true;
|
||||
}
|
||||
@ -135,7 +135,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->unique_name, dcb->user);
|
||||
dcb->server->name, dcb->user);
|
||||
}
|
||||
return rval;
|
||||
}
|
||||
@ -147,7 +147,7 @@ int PamBackendSession::authenticate(DCB *dcb)
|
||||
if (m_state == PAM_AUTH_INIT)
|
||||
{
|
||||
MXS_DEBUG("pam_backend_auth_authenticate sending password to '%s'.",
|
||||
dcb->server->unique_name);
|
||||
dcb->server->name);
|
||||
if (send_client_password(dcb))
|
||||
{
|
||||
rval = MXS_AUTH_INCOMPLETE;
|
||||
|
Reference in New Issue
Block a user