Article View: borland.public.cppbuilder.nativeapi
Article #13244GINA development...
From: Mike Collins
Date: Wed, 22 Oct 2003 01:00
Date: Wed, 22 Oct 2003 01:00
75 lines
4112 bytes
4112 bytes
Hi all, I hope everybody is well and still happy'ish. Things have been a
bit heated lately.
Just wondering if anybody had any experience or understanding of GINA
development. I'm currently developing a GINAStub based on the VC++ code
example from Microsoft's Dev Studio.
I've re-created it in Builder and it seems to work ok. However, my question
is a conceptual one and relates to the way Windows 'daisy-chains' the GINA's
that are installed. A bit of back-ground I think :-)
From what I can tell from MSDN research, when Windows first starts up
Winlongon.exe is started / created. This executable then examines the
registry key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon] to determine which GINA to load up. When 'one'
wishes to create a gina-stub, we modify this value to point to our GINA i.e.
myGINA.dll. When myGINA.dll starts up, to basically loads the original
value that was held in the above registry key (usually MSGINA.dll). The
stub-gina, myGINA.dll then redirects / relays on all it's exported functions
on to this secondary gina, MSGINA.dll.
Now this is what I have created, however what I don't understand is this;
according to the repeater code below, when the user logons on throught the
normal logon interface, myGINA.dll's method, WlxLoggedOutSAS, is called and
all the relevant information is passed to it, this then relays it on to
MSGINA.dll's same function (we will call our pointer to it
GWlxLoggedOutSAS). GWlxLoggedOutSAS then, within MSGINA.dll calls
LogonUser() to log the user on.
// declared / defined in Gina-Stub, myGINA.dll
int WINAPI WlxLoggedOutSAS(PVOID pWlxContext,
DWORD dwSasType,
PLUID pAuthenticationId,
PSID pLogonSid,
PDWORD
pdwOptions,
PHANDLE phToken,
PWLX_MPR_NOTIFY_INFO
pMprNotifyInfo,
PVOID
*pProfile)
{
int iRet;
// calls the original method within MSGINA.dll etc
iRet = GWlxLoggedOutSAS(
pWlxContext,
dwSasType,
pAuthenticationId,
pLogonSid,
pdwOptions,
phToken,
pMprNotifyInfo,
pProfile);
if(iRet == WLX_SAS_ACTION_LOGON) {
//
// copy pMprNotifyInfo and pLogonSid for later use
//
// pMprNotifyInfo->pszUserName
// pMprNotifyInfo->pszDomain
// pMprNotifyInfo->pszPassword
// pMprNotifyInfo->pszOldPassword
I don't understand this. The logon dialog is within MSGINA.dll, the logon
information (username, password, domain etc) all originale from MSGINA.dll,
however my stub method WlxLoggedOutSAS appears to recieve the call and
relays it back on to MSGINA.dll. I just don't understand this - MSGINA.dll
has no idea or information about myGINA.dll.
Thanks in advance,
Mike
Technical Details
Message-ID:
<3f95d1b2@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,6406f0fb19d91b94 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-10-21 18:09:15 PST Reply-To: "Mike Collins" <mikec@kr8.co.uk> From: "Mike Collins" <mikec@kr8.co.uk> Newsgroups: borland.public.cppbuilder.nativeapi Subject: GINA development... Date: Wed, 22 Oct 2003 02:00:31 +0100 Lines: 77 Organization: kr8 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 81.2.78.34 Message-ID: <3f95d1b2@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1066783154 81.2.78.34 (21 Oct 2003 17:39:14 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail