Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

ctlpcqos.c File Reference

Go to the source code of this file.

Functions

BOOLEAN SepClientTestStatic (VOID)
BOOLEAN SepClientTestDynamic (VOID)
BOOLEAN SepClientTestEffectiveOnly (BOOLEAN StaticTest)
BOOLEAN SepClientTestNotEffectiveOnly (BOOLEAN StaticTest)
BOOLEAN SepClientTestAnonymous (BOOLEAN StaticTest, BOOLEAN EffectiveOnly)
BOOLEAN SepClientTestIdentification (BOOLEAN StaticTest, BOOLEAN EffectiveOnly)
BOOLEAN SepClientTestImpersonation (BOOLEAN StaticTest, BOOLEAN EffectiveOnly)
VOID SepClientConnect (SECURITY_IMPERSONATION_LEVEL ImpersonationLevel, SECURITY_CONTEXT_TRACKING_MODE TrackingMode, BOOLEAN EffectiveOnly)
VOID SepClientMakeRemoteCall (VOID)
VOID SepClientDropConnection (VOID)
BOOLEAN SepClientTest (VOID)
NTSTATUS SepClientInitialize ()
BOOLEAN SepServerTestStatic (VOID)
BOOLEAN SepServerTestDynamic (VOID)
BOOLEAN SepServerTestEffectiveOnly (BOOLEAN StaticTest)
BOOLEAN SepServerTestNotEffectiveOnly (BOOLEAN StaticTest)
BOOLEAN SepServerTestAnonymous (BOOLEAN StaticTest, BOOLEAN EffectiveOnly)
BOOLEAN SepServerTestIdentification (BOOLEAN StaticTest, BOOLEAN EffectiveOnly)
BOOLEAN SepServerTestImpersonation (BOOLEAN StaticTest, BOOLEAN EffectiveOnly)
VOID SepServerWaitForNextConnect (VOID)
VOID SepServerGetNextMessage (VOID)
VOID SepServerCompleteMessage (VOID)
VOID SepServerDropConnection (VOID)
BOOLEAN SepServerTest (VOID)
NTSTATUS SepServerInitialize ()
VOID SepServerSpawnClientProcess (VOID)
BOOLEAN CtLpcQos (VOID)
VOID SepServerImpersonateClient (VOID)
VOID SepServerRevertToSelf (VOID)

Variables

NTSTATUS Status
OBJECT_ATTRIBUTES ObjectAttributes
STRING EventName
UNICODE_STRING UnicodeEventName
HANDLE EventHandle
UNICODE_STRING PortName
HANDLE EarPort
HANDLE TalkPort
PORT_MESSAGE RequestMessage
SECURITY_QUALITY_OF_SERVICE SecurityQos
ULONG RequestCount
HANDLE ClientToken
TOKEN_STATISTICS ClientTokenStatistics
ULONG IgnoreLength
HANDLE SepServerThread


Function Documentation

BOOLEAN CtLpcQos VOID   ) 
 

Definition at line 1187 of file ctlpcqos.c.

References DbgPrint, EventHandle, EventName, FALSE, L, NT_SUCCESS, NtCreateEvent(), NtTerminateThread(), NULL, ObjectAttributes, PortName, RtlAnsiStringToUnicodeString(), RtlInitString(), RtlInitUnicodeString(), SEASSERT_SUCCESS, SepClientInitialize(), SepClientTest(), SepServerInitialize(), SepServerTest(), Status, TRUE, and UnicodeEventName.

Referenced by Test().

01188 { 01189 01190 BOOLEAN Result = TRUE; 01191 01192 RtlInitUnicodeString( &PortName, L"\\TestLpcQosServerPort" ); 01193 01194 // 01195 // Determine whether we are the client or server side of the test. 01196 // This is done by creating or opening a named event object. If the 01197 // event does not yet exist, then we are the client, and must create 01198 // the server process. Otherwise, we are the server and the client 01199 // is waiting for us to signal the event. 01200 // 01201 01202 RtlInitString( &EventName, "\\TestLpcQosEvent" ); 01203 Status = RtlAnsiStringToUnicodeString( 01204 &UnicodeEventName, 01205 &EventName, 01206 TRUE ); SEASSERT_SUCCESS( NT_SUCCESS(Status) ); 01207 InitializeObjectAttributes( 01208 &ObjectAttributes, 01209 &UnicodeEventName, 01210 OBJ_OPENIF, 01211 NULL, 01212 NULL 01213 ); 01214 Status = NtCreateEvent( 01215 &EventHandle, 01216 EVENT_ALL_ACCESS, 01217 &ObjectAttributes, 01218 SynchronizationEvent, 01219 FALSE 01220 ); 01221 01222 if (Status == STATUS_OBJECT_NAME_EXISTS) { 01223 01224 // 01225 // Server is already running, therefore, this process gets to be 01226 // the client. 01227 // 01228 01229 Status = SepClientInitialize(); SEASSERT_SUCCESS(Status); 01230 Result = SepClientTest(); 01231 01232 } else { 01233 01234 SEASSERT_SUCCESS(Status); 01235 01236 // 01237 // Event wasn't yet there, so we must be the server. 01238 // 01239 01240 DbgPrint("Se: Starting LPC Impersonation Test.\n"); 01241 01242 Status = SepServerInitialize(); SEASSERT_SUCCESS(Status); 01243 Result = SepServerTest(); 01244 01245 DbgPrint("Se: End Test.\n"); 01246 01247 } 01248 01249 01250 01251 Status = NtTerminateThread( NtCurrentThread(), STATUS_SUCCESS); 01252 SEASSERT_SUCCESS(Status); 01253 01254 return Result; 01255 01256 }

VOID SepClientConnect SECURITY_IMPERSONATION_LEVEL  ImpersonationLevel,
SECURITY_CONTEXT_TRACKING_MODE  TrackingMode,
BOOLEAN  EffectiveOnly
 

Referenced by SepClientTestAnonymous(), SepClientTestIdentification(), and SepClientTestImpersonation().

VOID SepClientDropConnection VOID   ) 
 

Referenced by SepClientTestAnonymous(), SepClientTestIdentification(), and SepClientTestImpersonation().

NTSTATUS SepClientInitialize  ) 
 

VOID SepClientMakeRemoteCall VOID   ) 
 

Referenced by SepClientTestAnonymous(), SepClientTestIdentification(), and SepClientTestImpersonation().

BOOLEAN SepClientTest VOID   ) 
 

Referenced by CtLnpQos(), and CtLpcQos().

BOOLEAN SepClientTestAnonymous BOOLEAN  StaticTest,
BOOLEAN  EffectiveOnly
 

Referenced by SepClientTestEffectiveOnly(), and SepClientTestNotEffectiveOnly().

BOOLEAN SepClientTestDynamic VOID   ) 
 

Referenced by SepClientTest().

BOOLEAN SepClientTestEffectiveOnly BOOLEAN  StaticTest  ) 
 

Referenced by SepClientTestDynamic(), and SepClientTestStatic().

BOOLEAN SepClientTestIdentification BOOLEAN  StaticTest,
BOOLEAN  EffectiveOnly
 

Referenced by SepClientTestEffectiveOnly(), and SepClientTestNotEffectiveOnly().

BOOLEAN SepClientTestImpersonation BOOLEAN  StaticTest,
BOOLEAN  EffectiveOnly
 

Referenced by SepClientTestEffectiveOnly(), and SepClientTestNotEffectiveOnly().

BOOLEAN SepClientTestNotEffectiveOnly BOOLEAN  StaticTest  ) 
 

Referenced by SepClientTestDynamic(), and SepClientTestStatic().

BOOLEAN SepClientTestStatic VOID   ) 
 

Referenced by SepClientTest().

VOID SepServerCompleteMessage VOID   ) 
 

Referenced by SepServerTestAnonymous(), SepServerTestIdentification(), and SepServerTestImpersonation().

VOID SepServerDropConnection VOID   ) 
 

Referenced by SepServerTestAnonymous(), SepServerTestIdentification(), and SepServerTestImpersonation().

VOID SepServerGetNextMessage VOID   ) 
 

Referenced by SepServerTestAnonymous(), SepServerTestIdentification(), and SepServerTestImpersonation().

VOID SepServerImpersonateClient VOID   ) 
 

Definition at line 645 of file ctlpcqos.c.

References NtImpersonateClientOfPort(), RequestMessage, SEASSERT_SUCCESS, Status, and TalkPort.

Referenced by SepServerTestAnonymous(), SepServerTestIdentification(), and SepServerTestImpersonation().

00647 { 00648 00649 Status = NtImpersonateClientOfPort( 00650 TalkPort, 00651 &RequestMessage 00652 ); SEASSERT_SUCCESS(Status); 00653 00654 }

NTSTATUS SepServerInitialize  ) 
 

VOID SepServerRevertToSelf VOID   ) 
 

Definition at line 658 of file ctlpcqos.c.

References NtSetInformationThread(), NTSTATUS(), NULL, SEASSERT_SUCCESS, and SepServerThread.

Referenced by SepServerTestAnonymous(), SepServerTestIdentification(), and SepServerTestImpersonation().

00660 { 00661 NTSTATUS TmpStatus; 00662 HANDLE NullHandle; 00663 00664 NullHandle = NULL; 00665 TmpStatus = NtSetInformationThread( 00666 SepServerThread, 00667 ThreadImpersonationToken, 00668 (PVOID)&NullHandle, 00669 (ULONG)sizeof(HANDLE) 00670 ); SEASSERT_SUCCESS(TmpStatus); 00671 00672 }

VOID SepServerSpawnClientProcess VOID   ) 
 

Referenced by SepServerInitialize().

BOOLEAN SepServerTest VOID   ) 
 

Referenced by CtLnpQos(), and CtLpcQos().

BOOLEAN SepServerTestAnonymous BOOLEAN  StaticTest,
BOOLEAN  EffectiveOnly
 

Referenced by SepServerTestEffectiveOnly(), and SepServerTestNotEffectiveOnly().

BOOLEAN SepServerTestDynamic VOID   ) 
 

Referenced by SepServerTest().

BOOLEAN SepServerTestEffectiveOnly BOOLEAN  StaticTest  ) 
 

Referenced by SepServerTestDynamic(), and SepServerTestStatic().

BOOLEAN SepServerTestIdentification BOOLEAN  StaticTest,
BOOLEAN  EffectiveOnly
 

Referenced by SepServerTestEffectiveOnly(), and SepServerTestNotEffectiveOnly().

BOOLEAN SepServerTestImpersonation BOOLEAN  StaticTest,
BOOLEAN  EffectiveOnly
 

Referenced by SepServerTestEffectiveOnly(), and SepServerTestNotEffectiveOnly().

BOOLEAN SepServerTestNotEffectiveOnly BOOLEAN  StaticTest  ) 
 

Referenced by SepServerTestDynamic(), and SepServerTestStatic().

BOOLEAN SepServerTestStatic VOID   ) 
 

Referenced by SepServerTest().

VOID SepServerWaitForNextConnect VOID   ) 
 

Referenced by SepServerTestAnonymous(), SepServerTestIdentification(), and SepServerTestImpersonation().


Variable Documentation

HANDLE ClientToken
 

Definition at line 28 of file ctlpcqos.c.

TOKEN_STATISTICS ClientTokenStatistics
 

Definition at line 29 of file ctlpcqos.c.

HANDLE EarPort
 

Definition at line 23 of file ctlpcqos.c.

HANDLE EventHandle
 

Definition at line 21 of file ctlpcqos.c.

STRING EventName
 

Definition at line 19 of file ctlpcqos.c.

ULONG IgnoreLength
 

Definition at line 30 of file ctlpcqos.c.

OBJECT_ATTRIBUTES ObjectAttributes
 

Definition at line 18 of file ctlpcqos.c.

UNICODE_STRING PortName
 

Definition at line 22 of file ctlpcqos.c.

ULONG RequestCount
 

Definition at line 27 of file ctlpcqos.c.

PORT_MESSAGE RequestMessage
 

Definition at line 25 of file ctlpcqos.c.

Referenced by LpcRequestPort(), LpcRequestWaitReplyPort(), NtRequestPort(), NtRequestWaitReplyPort(), and SepServerImpersonateClient().

SECURITY_QUALITY_OF_SERVICE SecurityQos
 

Definition at line 26 of file ctlpcqos.c.

HANDLE SepServerThread
 

Definition at line 32 of file ctlpcqos.c.

NTSTATUS Status
 

Definition at line 17 of file ctlpcqos.c.

HANDLE TalkPort
 

Definition at line 24 of file ctlpcqos.c.

UNICODE_STRING UnicodeEventName
 

Definition at line 20 of file ctlpcqos.c.


Generated on Sat May 15 19:43:21 2004 for test by doxygen 1.3.7