I have problems with KernelMode call of the InitializeSecurityContextW().
The whole authentication mechanism works just fine on W2K and XP, but on
2003 Server it fails on fist Client side
call of the InitializeSecurityContextW.
Anyway, I found very strange behaviour of the call:
If call the function from system context, the function succeeds, but the
output token buffer is invalid (full zeroed and the next call on the Server
side with this buffer fails).
If call from logged on user context, the function fails with ntStatus =
0xC0000005 ( ACCESS_VIOLATION ).
Any ideas where is the problem?
Kristian
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // After the previous AcquireCredentialsHandleW() I have obtained theCredentialHandle // // // Prepare the buffers // OutBuffDesc.ulVersion = 0; OutBuffDesc.cBuffers = 1; OutBuffDesc.pBuffers = &OutSecBuff; OutSecBuff.cbBuffer = *pcbOut; OutSecBuff.BufferType = SECBUFFER_TOKEN; OutSecBuff.pvBuffer = pOut; ss = InitializeSecurityContextW( &CredentialHandle, NULL, NULL, ISC_REQ_CONFIDENTIALITY, 0, SECURITY_NATIVE_DREP, NULL, 0, &SecurityContextHandle, &OutBuffDesc, &ContextAttributes, &Lifetime); if( !SEC_SUCCESS(ss) ) { return ss; }