WakA
2004-07-17 17:20:24 UTC
As i am currently writing a custom authentication package i'm running into
some problems (ofcourse). One of these is the usage of this struct. I'm
using it in the LsaApLogonUser function and trying to fill the struct with
information so i can return it.
How exactly can i allocate this structure properly, since the
LSA_TOKEN_INFORMATION_V2 is typedef as being
typedef LSA_TOKEN_INFORMATION_V1 LSA_TOKEN_INFORMATION_V2,
*PLSA_TOKEN_INFORMATION_V2;
How exactly if V2 is a monolithically allocated structure can i allocate
everything in the right order. That is i'm assuming everything is a
contiguous block of all the info the size of all the structures in
tokeninformation.
Question number 2 - The Profile buffer:
How am i to actually allocate this buffer and pass it back to my
LsaLogonUser which i am calling from my own GINA. This is currently how i am
allocating.
error =
gDispatchTable->AllocateClientBuffer(ClientRequest,PROFILE_BUFFER_LENGTH,*Pr
ofileBuffer);
if (!error) {
*ProfileBufferLength = PROFILE_BUFFER_LENGTH;
wcscpy((wchar_t*)ProfileBuffer,L"Dit dan weer wel");
}
Since the AllocateClientBuffer must be used (according to msdn) the memory
is a base address from the clients point of view. Is this allocated now in
the calling function to LsaApLogonUser or not?
Question number 3 - Responsibilities of the authentication
package/LsaApLogonUser:
What are all the responsibilities of this function (LsaApLogonUser),
currently i understand it to be:
1-Allocate ClientBuffer
3-Fill TokenInformation struct (be it V1 or V2)
2-AllocateLocallyUniqueId(LogonId)
4-CreateLogonSession(LogonID)
Something tells me i am still missing something since LsaLogonUser returns
998 or "Invalid access to memory location. "(The NTSTATUS converted to
windows error code). And i cannot see where i made this error.
Well, you made it through this post..thanks for that anyway :)
Chris
some problems (ofcourse). One of these is the usage of this struct. I'm
using it in the LsaApLogonUser function and trying to fill the struct with
information so i can return it.
How exactly can i allocate this structure properly, since the
LSA_TOKEN_INFORMATION_V2 is typedef as being
typedef LSA_TOKEN_INFORMATION_V1 LSA_TOKEN_INFORMATION_V2,
*PLSA_TOKEN_INFORMATION_V2;
How exactly if V2 is a monolithically allocated structure can i allocate
everything in the right order. That is i'm assuming everything is a
contiguous block of all the info the size of all the structures in
tokeninformation.
Question number 2 - The Profile buffer:
How am i to actually allocate this buffer and pass it back to my
LsaLogonUser which i am calling from my own GINA. This is currently how i am
allocating.
error =
gDispatchTable->AllocateClientBuffer(ClientRequest,PROFILE_BUFFER_LENGTH,*Pr
ofileBuffer);
if (!error) {
*ProfileBufferLength = PROFILE_BUFFER_LENGTH;
wcscpy((wchar_t*)ProfileBuffer,L"Dit dan weer wel");
}
Since the AllocateClientBuffer must be used (according to msdn) the memory
is a base address from the clients point of view. Is this allocated now in
the calling function to LsaApLogonUser or not?
Question number 3 - Responsibilities of the authentication
package/LsaApLogonUser:
What are all the responsibilities of this function (LsaApLogonUser),
currently i understand it to be:
1-Allocate ClientBuffer
3-Fill TokenInformation struct (be it V1 or V2)
2-AllocateLocallyUniqueId(LogonId)
4-CreateLogonSession(LogonID)
Something tells me i am still missing something since LsaLogonUser returns
998 or "Invalid access to memory location. "(The NTSTATUS converted to
windows error code). And i cannot see where i made this error.
Well, you made it through this post..thanks for that anyway :)
Chris