60 sizeof(BasePriority));
95 sizeof(BasePriority));
441 CurrentCid = CurrentThread->
ClientId;
463 CurrentProcess = CurrentThread->
Process;
593 CsrThread->
Flags = 0;
768 NextEntry = NextEntry->
Flink;
938 if (!CsrThread) CsrThread = CurrentThread;
949 CsrThread->ThreadHandle,
956 DPRINT1(
"CSRSS: Can't impersonate client thread - Status = %lx\n",
Status);
1020 NextEntry = NextEntry->
Flink;
1069 DPRINT1(
"CSRSS: CsrRevertToSelf called while not impersonating\n");
1083 &ImpersonationToken,
1084 sizeof(ImpersonationToken));
1118 sizeof(ProcessPriority));
1149 sizeof(ProcessPriority));
1186 NextEntry = NextEntry->
Flink;
1247 if (ReturnCsrProcess)
1253 return ReturnCsrProcess;
1302 NextEntry = NextEntry->
Flink;
1353 DPRINT1(
"Process %x cancelled forced shutdown (Dll = %d)\n",
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
#define CsrGetClientThread()
@ CsrProcessCreateNewGroup
struct _CSR_PROCESS CSR_PROCESS
@ CsrDebugProcessChildren
@ CsrDebugOnlyThisProcess
@ CsrShutdownNonCsrProcess
#define CsrProcessPriorityFlags
#define NT_SUCCESS(StatCode)
@ ThreadImpersonationToken
#define RemoveEntryList(Entry)
#define InsertTailList(ListHead, Entry)
#define InitializeListHead(ListHead)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define PROCESS_PRIORITY_NORMAL_FOREGROUND
NTSYSAPI void WINAPI DbgBreakPoint(void)
@ ProcessForegroundInformation
struct _SECURITY_QUALITY_OF_SERVICE SECURITY_QUALITY_OF_SERVICE
_In_ BOOL _In_ HANDLE hProcess
#define SE_INC_BASE_PRIORITY_PRIVILEGE
NTSYSAPI NTSTATUS NTAPI RtlInitializeCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
NTSYSAPI NTSTATUS NTAPI RtlAdjustPrivilege(_In_ ULONG Privilege, _In_ BOOLEAN NewValue, _In_ BOOLEAN ForThread, _Out_ PBOOLEAN OldValue)
#define NtCurrentProcess()
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
_In_ ULONG _In_ ULONG _In_ ULONG Length
NTSTATUS NTAPI NtQueryInformationThread(IN HANDLE ThreadHandle, IN THREADINFOCLASS ThreadInformationClass, OUT PVOID ThreadInformation, IN ULONG ThreadInformationLength, OUT PULONG ReturnLength OPTIONAL)
NTSTATUS NTAPI NtSetInformationProcess(IN HANDLE ProcessHandle, IN PROCESSINFOCLASS ProcessInformationClass, IN PVOID ProcessInformation, IN ULONG ProcessInformationLength)
NTSTATUS NTAPI NtSetInformationThread(IN HANDLE ThreadHandle, IN THREADINFOCLASS ThreadInformationClass, IN PVOID ThreadInformation, IN ULONG ThreadInformationLength)
NTSTATUS NTAPI NtOpenProcessToken(IN HANDLE ProcessHandle, IN ACCESS_MASK DesiredAccess, OUT PHANDLE TokenHandle)
NTSTATUS NTAPI NtImpersonateThread(IN HANDLE ThreadHandle, IN HANDLE ThreadToImpersonateHandle, IN PSECURITY_QUALITY_OF_SERVICE SecurityQualityOfService)
NTSTATUS NTAPI NtOpenThreadToken(_In_ HANDLE ThreadHandle, _In_ ACCESS_MASK DesiredAccess, _In_ BOOLEAN OpenAsSelf, _Out_ PHANDLE TokenHandle)
Opens a token that is tied to a thread handle.
#define STATUS_THREAD_IS_TERMINATING
#define STATUS_BAD_IMPERSONATION_LEVEL
#define STATUS_BUFFER_TOO_SMALL
PULONG MinorVersion OPTIONAL
ULONG ProcessGroupSequence
PVOID ServerData[ANYSIZE_ARRAY]
PCSR_DISCONNECT_CALLBACK DisconnectCallback
PCSR_NEWPROCESS_CALLBACK NewProcessCallback
PCSR_SHUTDOWNPROCESS_CALLBACK ShutdownProcessCallback
struct _CSR_WAIT_BLOCK * WaitBlock
struct _LIST_ENTRY * Flink
NTSTATUS NTAPI CsrInsertThread(IN PCSR_PROCESS Process, IN PCSR_THREAD Thread)
BOOLEAN NTAPI ProtectHandle(IN HANDLE ObjectHandle)
VOID NTAPI CsrReferenceNtSession(IN PCSR_NT_SESSION Session)
VOID NTAPI CsrLockedDereferenceThread(IN PCSR_THREAD CsrThread)
RTL_CRITICAL_SECTION CsrWaitListsLock
VOID NTAPI CsrDeallocateThread(IN PCSR_THREAD CsrThread)
#define CSR_SERVER_DLL_MAX
#define CsrAcquireWaitLock()
PCSR_THREAD NTAPI CsrLocateThreadByClientId(OUT PCSR_PROCESS *Process OPTIONAL, IN PCLIENT_ID ClientId)
BOOLEAN NTAPI CsrNotifyWaitBlock(IN PCSR_WAIT_BLOCK WaitBlock, IN PLIST_ENTRY WaitList, IN PVOID WaitArgument1, IN PVOID WaitArgument2, IN ULONG WaitFlags, IN BOOLEAN DereferenceThread)
PCSR_THREAD NTAPI CsrAllocateThread(IN PCSR_PROCESS CsrProcess)
#define ProcessStructureListLocked()
#define CsrAcquireProcessLock()
PCSR_SERVER_DLL CsrLoadedServerDll[CSR_SERVER_DLL_MAX]
#define CsrReleaseProcessLock()
#define CsrReleaseWaitLock()
LIST_ENTRY CsrThreadHashTable[NUMBER_THREAD_HASH_BUCKETS]
VOID NTAPI CsrDereferenceNtSession(IN PCSR_NT_SESSION Session, IN NTSTATUS ExitStatus)
#define NUMBER_THREAD_HASH_BUCKETS
PCSR_PROCESS CsrRootProcess
PCSR_PROCESS NTAPI CsrAllocateProcess(VOID)
NTSTATUS NTAPI CsrUnlockProcess(IN PCSR_PROCESS CsrProcess)
ULONG CsrTotalPerProcessDataLength
BOOLEAN NTAPI CsrImpersonateClient(IN PCSR_THREAD CsrThread)
NTSTATUS NTAPI CsrDestroyProcess(IN PCLIENT_ID Cid, IN NTSTATUS ExitStatus)
BOOLEAN NTAPI CsrRevertToSelf(VOID)
VOID NTAPI CsrRemoveProcess(IN PCSR_PROCESS CsrProcess)
VOID NTAPI CsrInsertProcess(IN PCSR_PROCESS ParentProcess OPTIONAL, IN PCSR_PROCESS CsrProcess)
VOID NTAPI CsrSetForegroundPriority(IN PCSR_PROCESS CsrProcess)
SECURITY_QUALITY_OF_SERVICE CsrSecurityQos
VOID NTAPI CsrSetToShutdownPriority(VOID)
VOID NTAPI CsrDeallocateProcess(IN PCSR_PROCESS CsrProcess)
VOID NTAPI CsrProcessRefcountZero(IN PCSR_PROCESS CsrProcess)
NTSTATUS NTAPI CsrInitializeProcessStructure(VOID)
VOID NTAPI CsrSetToNormalPriority(VOID)
VOID NTAPI CsrLockedReferenceProcess(IN PCSR_PROCESS CsrProcess)
PCSR_PROCESS NTAPI FindProcessForShutdown(IN PLUID CallerLuid)
NTSTATUS NTAPI CsrShutdownProcesses(IN PLUID CallerLuid, IN ULONG Flags)
NTSTATUS NTAPI CsrDebugProcessStop(IN PCSR_PROCESS CsrProcess)
NTSTATUS NTAPI CsrGetProcessLuid(IN HANDLE hProcess OPTIONAL, OUT PLUID Luid)
NTSTATUS NTAPI CsrDebugProcess(IN PCSR_PROCESS CsrProcess)
NTSTATUS NTAPI CsrLockProcessByClientId(IN HANDLE Pid, OUT PCSR_PROCESS *CsrProcess)
ULONG CsrProcessSequenceCount
RTL_CRITICAL_SECTION CsrProcessLock
VOID NTAPI CsrSetBackgroundPriority(IN PCSR_PROCESS CsrProcess)
NTSTATUS NTAPI CsrCreateProcess(IN HANDLE hProcess, IN HANDLE hThread, IN PCLIENT_ID ClientId, IN PCSR_NT_SESSION NtSession, IN ULONG Flags, IN PCLIENT_ID DebugCid)
VOID NTAPI CsrDereferenceProcess(IN PCSR_PROCESS CsrProcess)
VOID NTAPI CsrLockedDereferenceProcess(PCSR_PROCESS CsrProcess)
_Must_inspect_result_ __kernel_entry NTSTATUS NTAPI NtQueryInformationToken(_In_ HANDLE TokenHandle, _In_ TOKEN_INFORMATION_CLASS TokenInformationClass, _Out_writes_bytes_to_opt_(TokenInformationLength, *ReturnLength) PVOID TokenInformation, _In_ ULONG TokenInformationLength, _Out_ PULONG ReturnLength)
Queries a specific type of information in regard of an access token based upon the information class....
#define RtlMoveMemory(Destination, Source, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_ACCESS_DENIED
#define STATUS_UNSUCCESSFUL
static int Link(const char **args)
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
_Must_inspect_result_ _In_ ULONG Flags
_Out_ PCLIENT_ID ClientId
#define RtlEqualLuid(Luid1, Luid2)
#define SECURITY_STATIC_TRACKING
#define NtCurrentThread()