I have an application which uses SSPI for authentication. I could
authenticate users successfully and impersonate the users. (original
user A, impersonated user B)
Now when I do CreateThread after impersonating the user, the newly
created thread runs as the original user (as user A). I want the newly
created thread to run as the impersonated user (user B). I am not very
sure how should I populate the LPSECURITY_ATTRIBUTES in my case (I
guess thats the cause of this issue.)
Please see my code snippet below:
****
rc = (pf->ImpersonateSecurityContext)( &srvCtx );
....
threadRet = CreateThread( NULL,0, (LPTHREAD_START_ROUTINE)
Ganesh_Client_Impl, NULL, 0, NULL);
****
Second query I have is:
Is it possible for me to use the SSPI security context I have at the
server side to authenticate to another server. An SSPI client has
connected to server A and authenticated successfully. Now A has the
security context of the client. I want to use the SSPI context I have
on server A to authenticate again to server B. (A becomes SSPI client
and B becomes server, A uses the context it has to authenticate.)
Thanks in advance.
Ganesh Tambat


|