|
|
@ -804,6 +804,7 @@ void TDEKerberosServerSocket::continueKerberosInitialization() {
|
|
|
|
int slen;
|
|
|
|
int slen;
|
|
|
|
char buf[NET_SEC_BUF_SIZE];
|
|
|
|
char buf[NET_SEC_BUF_SIZE];
|
|
|
|
sasl_ssf_t *ssf;
|
|
|
|
sasl_ssf_t *ssf;
|
|
|
|
|
|
|
|
const void *sasl_prop_ptr;
|
|
|
|
|
|
|
|
|
|
|
|
if (m_krbInitRunning) {
|
|
|
|
if (m_krbInitRunning) {
|
|
|
|
switch (m_krbInitState) {
|
|
|
|
switch (m_krbInitState) {
|
|
|
@ -916,7 +917,8 @@ void TDEKerberosServerSocket::continueKerberosInitialization() {
|
|
|
|
sendSASLDataToNetwork(m_krbInitData, m_krbInitLastLen);
|
|
|
|
sendSASLDataToNetwork(m_krbInitData, m_krbInitLastLen);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
m_krbInitResult = sasl_getprop(saslData->m_krbConnection, SASL_USERNAME, (const void **)&m_krbInitData);
|
|
|
|
m_krbInitResult = sasl_getprop(saslData->m_krbConnection, SASL_USERNAME, &sasl_prop_ptr);
|
|
|
|
|
|
|
|
m_krbInitData = (const char *)sasl_prop_ptr;
|
|
|
|
if (m_krbInitResult != SASL_OK) {
|
|
|
|
if (m_krbInitResult != SASL_OK) {
|
|
|
|
printf("[WARNING] Unable to determine authenticated username!\n\r");
|
|
|
|
printf("[WARNING] Unable to determine authenticated username!\n\r");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -926,7 +928,8 @@ void TDEKerberosServerSocket::continueKerberosInitialization() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
#if 0
|
|
|
|
m_krbInitResult = sasl_getprop(saslData->m_krbConnection, SASL_DEFUSERREALM, (const void **)&m_krbInitData);
|
|
|
|
m_krbInitResult = sasl_getprop(saslData->m_krbConnection, SASL_DEFUSERREALM, (const void **)&sasl_prop_ptr);
|
|
|
|
|
|
|
|
m_krbInitData = (const char *)sasl_prop_ptr;
|
|
|
|
if (m_krbInitResult != SASL_OK) {
|
|
|
|
if (m_krbInitResult != SASL_OK) {
|
|
|
|
printf("[WARNING] Unable to determine authenticated realm!\n\r");
|
|
|
|
printf("[WARNING] Unable to determine authenticated realm!\n\r");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -938,7 +941,8 @@ void TDEKerberosServerSocket::continueKerberosInitialization() {
|
|
|
|
m_authenticatedRealmName = "(NULL)";
|
|
|
|
m_authenticatedRealmName = "(NULL)";
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
m_krbInitResult = sasl_getprop(saslData->m_krbConnection, SASL_SSF, (const void **)&ssf);
|
|
|
|
m_krbInitResult = sasl_getprop(saslData->m_krbConnection, SASL_SSF, &sasl_prop_ptr);
|
|
|
|
|
|
|
|
ssf = (sasl_ssf_t *)sasl_prop_ptr;
|
|
|
|
if (m_krbInitResult != SASL_OK) {
|
|
|
|
if (m_krbInitResult != SASL_OK) {
|
|
|
|
printf("[WARNING] Unable to determine SSF!\n\r");
|
|
|
|
printf("[WARNING] Unable to determine SSF!\n\r");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -946,7 +950,8 @@ void TDEKerberosServerSocket::continueKerberosInitialization() {
|
|
|
|
printf("[DEBUG] Authenticated SSF: %d\n", *ssf);
|
|
|
|
printf("[DEBUG] Authenticated SSF: %d\n", *ssf);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
m_krbInitResult = sasl_getprop(saslData->m_krbConnection, SASL_MAXOUTBUF, (const void **)&m_negotiatedMaxBufferSize);
|
|
|
|
m_krbInitResult = sasl_getprop(saslData->m_krbConnection, SASL_MAXOUTBUF, &sasl_prop_ptr);
|
|
|
|
|
|
|
|
m_negotiatedMaxBufferSize = *((unsigned*)sasl_prop_ptr);
|
|
|
|
if (m_krbInitResult != SASL_OK) {
|
|
|
|
if (m_krbInitResult != SASL_OK) {
|
|
|
|
printf("[WARNING] Unable to determine maximum buffer size!\n\r");
|
|
|
|
printf("[WARNING] Unable to determine maximum buffer size!\n\r");
|
|
|
|
m_negotiatedMaxBufferSize = NET_SEC_BUF_SIZE;
|
|
|
|
m_negotiatedMaxBufferSize = NET_SEC_BUF_SIZE;
|
|
|
|