Click here to Skip to main content
15,904,828 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: sizeof char* array Pin
Programm3r8-Jan-08 4:32
Programm3r8-Jan-08 4:32 
QuestionRe: sizeof char* array Pin
David Crow8-Jan-08 4:56
David Crow8-Jan-08 4:56 
GeneralRe: sizeof char* array Pin
CPallini8-Jan-08 5:00
mveCPallini8-Jan-08 5:00 
GeneralRe: sizeof char* array Pin
Chris Losinger8-Jan-08 4:02
professionalChris Losinger8-Jan-08 4:02 
GeneralRe: sizeof char* array Pin
Programm3r8-Jan-08 4:12
Programm3r8-Jan-08 4:12 
GeneralRe: sizeof char* array Pin
CPallini8-Jan-08 4:13
mveCPallini8-Jan-08 4:13 
GeneralRe: sizeof char* array Pin
Programm3r8-Jan-08 4:18
Programm3r8-Jan-08 4:18 
GeneralLsaLogonUser() + MSV1_0_LM20_LOGON Pin
choupani8-Jan-08 3:49
choupani8-Jan-08 3:49 
I'm developing a firewall that authenticate users with ntlm against Active Directory.
My ntlm secnario is complete and work truly but my LsaLogonUser has problem.
When I pass NTLM Challenge,User Name,Lan Manager Response, NTLM Response,WorkStation Name, Domain Name to MSV1_0_LM20_LOGON structure and pass it to LsaLogonUser
function, LsaLogonUser return error,
Dose anybody have a sample or code that can help me?

My code is here:
UNICODE_STRING TempString;
UNICODE_STRING TempString2;
PMSV1_0_LM20_LOGON Auth;
PCHAR Auth1[40*5]; /* lots o' space */
PUCHAR Strings;

Auth = (PMSV1_0_LM20_LOGON) Auth1;
Strings = (PUCHAR)(Auth + 1);
Auth->MessageType = MsV1_0Lm20Logon;
RtlMoveMemory( Auth->ChallengeToClient,challenge,MSV1_0_CHALLENGE_LENGTH );
RtlInitUnicodeString( &TempString, L"Administrator" );
NlpPutString( &Auth->UserName, &TempString, &Strings );
RtlInitUnicodeString( &TempString, L"TOSHIBA" );
NlpPutString( &Auth->Workstation, &TempString, &Strings );
Auth->CaseSensitiveChallengeResponse.Length = 0;
Auth->CaseSensitiveChallengeResponse.MaximumLength = 0;
Auth->CaseSensitiveChallengeResponse.Buffer = NULL;
TempString2.Buffer = (PWSTR)lmPassword;
TempString2.Length = (USHORT)cbLmResp;
TempString2.MaximumLength = TempString2.Length;
if( TempString2.Length > 24 ) {
TempString2.Length = 24;
}
NlpPutString((PUNICODE_STRING)&Auth->CaseInsensitiveChallengeResponse,(PUNICODE_STRING)&TempString2,&Strings);
RtlInitUnicodeString( &TempString, L"KHARAZM.SERVER" );
NlpPutString( &Auth->LogonDomainName, &TempString, &Strings );
UNICODE_STRING OrgnName;
RtlInitUnicodeString( &OrgnName, L"TOSHIBA" );
ULONG ProfileBufferSize;
sysLog("Len=%d",Strings - (PUCHAR)Auth);

Status = LsaLogonUser(
gLsaHandle,
(PSTRING)&OrgnName,
Network,
gAuthPackageId,
// LATER? AuthenticationPackage | LSA_CALL_LICENSE_SERVER,
Auth,
Strings - (PUCHAR)Auth,
NULL,
&SourceContext,
(PVOID *)&pProfileBuffer,
&ProfileBufferSize,
&LogonLuid,
pLogonToken,
&Quotas,
&SubStatus );
QuestionRe: LsaLogonUser() + MSV1_0_LM20_LOGON Pin
Rajesh R Subramanian8-Jan-08 21:44
professionalRajesh R Subramanian8-Jan-08 21:44 
GeneralRe: LsaLogonUser() + MSV1_0_LM20_LOGON Pin
choupani8-Jan-08 21:51
choupani8-Jan-08 21:51 
GeneralRe: LsaLogonUser() + MSV1_0_LM20_LOGON Pin
Rajesh R Subramanian8-Jan-08 22:02
professionalRajesh R Subramanian8-Jan-08 22:02 
GeneralRe: LsaLogonUser() + MSV1_0_LM20_LOGON Pin
choupani8-Jan-08 22:10
choupani8-Jan-08 22:10 
GeneralRe: LsaLogonUser() + MSV1_0_LM20_LOGON Pin
Rajesh R Subramanian8-Jan-08 22:15
professionalRajesh R Subramanian8-Jan-08 22:15 
GeneralRe: LsaLogonUser() + MSV1_0_LM20_LOGON Pin
choupani8-Jan-08 22:31
choupani8-Jan-08 22:31 
GeneralWorking with dynamically created dialog Pin
narayanagvs8-Jan-08 1:56
narayanagvs8-Jan-08 1:56 
GeneralRe: Working with dynamically created dialog Pin
CPallini8-Jan-08 2:16
mveCPallini8-Jan-08 2:16 
QuestionRe: Working with dynamically created dialog Pin
David Crow8-Jan-08 3:13
David Crow8-Jan-08 3:13 
GeneralRe: Working with dynamically created dialog Pin
Hamid_RT8-Jan-08 18:14
Hamid_RT8-Jan-08 18:14 
Generalunexpected exception handler Pin
George_George8-Jan-08 1:46
George_George8-Jan-08 1:46 
GeneralRe: unexpected exception handler Pin
Matthew Faithfull8-Jan-08 7:27
Matthew Faithfull8-Jan-08 7:27 
GeneralRe: unexpected exception handler Pin
George_George8-Jan-08 16:29
George_George8-Jan-08 16:29 
GeneralRe: unexpected exception handler Pin
Matthew Faithfull8-Jan-08 21:50
Matthew Faithfull8-Jan-08 21:50 
GeneralRe: unexpected exception handler Pin
George_George9-Jan-08 2:29
George_George9-Jan-08 2:29 
Generalusing swap to make assignment operator exception safe Pin
George_George8-Jan-08 1:14
George_George8-Jan-08 1:14 
GeneralRe: using swap to make assignment operator exception safe Pin
CPallini8-Jan-08 2:03
mveCPallini8-Jan-08 2:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.