Use new authentication for reauthentication

This fixes the reauthentication of users that was missing from the new
implementation. Now COM_CHANGE_USER should work properly.
This commit is contained in:
Markus Mäkelä
2017-01-30 12:23:06 +02:00
parent acdde499ed
commit fe1a49f4e9
5 changed files with 43 additions and 20 deletions

View File

@ -1591,7 +1591,8 @@ static int gw_change_user(DCB *backend,
auth_ret = dcb->authfunc.reauthenticate(dcb, username,
auth_token, auth_token_len,
client_protocol->scramble,
sizeof(client_protocol->scramble));
sizeof(client_protocol->scramble),
client_sha1, sizeof(client_sha1));
strcpy(current_session->db, current_database);
spinlock_release(&in_session->ses_lock);
@ -1608,7 +1609,8 @@ static int gw_change_user(DCB *backend,
auth_ret = dcb->authfunc.reauthenticate(dcb, username,
auth_token, auth_token_len,
client_protocol->scramble,
sizeof(client_protocol->scramble));
sizeof(client_protocol->scramble),
client_sha1, sizeof(client_sha1));
strcpy(current_session->db, current_database);
spinlock_release(&in_session->ses_lock);