ken
2012-10-29 13:08:14 UTC
A user on my TinyTDS/SQLServer list reported this bug with FreeTDS. They could not get Windows authentication to work and had to make the following change to sspi.c
- Ken
free(auth_buf);
// code added start
if (status == SEC_I_COMPLETE_AND_CONTINUE || status == SEC_I_CONTINUE_NEEDED) {
if (out_buf.cbBuffer > 0)
{
tds_put_n(tds, auth->tds_auth.packet, out_buf.cbBuffer);
tds_flush_packet(tds);
return status;
}
}
// code added end
if (status != SEC_E_OK)
return TDS_FAIL;
After that change, they got Windows authentication working and saw the following FreeTDS debug info.// code added start
if (status == SEC_I_COMPLETE_AND_CONTINUE || status == SEC_I_CONTINUE_NEEDED) {
if (out_buf.cbBuffer > 0)
{
tds_put_n(tds, auth->tds_auth.packet, out_buf.cbBuffer);
tds_flush_packet(tds);
return status;
}
}
// code added end
if (status != SEC_E_OK)
return TDS_FAIL;
AUTH
ENVCHANGE
INFO
ENVCHANGE
ENVCHANGE
INFO
LOGINACK
ENVCHANGE
DONE
Finally, there is the LOGINACK and DONE tokens : )
Opinions on doing this patch?ENVCHANGE
INFO
ENVCHANGE
ENVCHANGE
INFO
LOGINACK
ENVCHANGE
DONE
Finally, there is the LOGINACK and DONE tokens : )
- Ken