MXS-862: Move sending of OK packet to mysql_client

Moving the sending of the final OK packet of the authentication process to
the client protocol plugin makes the authentication plugins simpler.

By reading the client's sequence and incrementing that by one, the client
protocol module will always send the correct sequence byte in the final OK
packet.
This commit is contained in:
Markus Makela
2016-10-07 07:40:11 +03:00
parent 239b53e156
commit 5d96faedd8
4 changed files with 11 additions and 3 deletions

View File

@ -281,8 +281,7 @@ int gssapi_auth_authenticate(DCB *dcb)
MYSQL_session *ses = (MYSQL_session*)dcb->data;
if (validate_gssapi_token(ses->auth_token, ses->auth_token_len) &&
mxs_mysql_send_ok(dcb, 4, 0, NULL))
if (validate_gssapi_token(ses->auth_token, ses->auth_token_len))
{
rval = MXS_AUTH_SUCCEEDED;
}