Missed these guys.

svn path=/trunk/; revision=55694
This commit is contained in:
Alex Ionescu 2012-02-19 02:25:31 +00:00
parent d68458a259
commit fa51806949
5 changed files with 17 additions and 48 deletions

View file

@ -326,7 +326,7 @@ CheckVolume(
NtDrivePath[wcslen(NtDrivePath)-1] = 0; NtDrivePath[wcslen(NtDrivePath)-1] = 0;
RtlInitUnicodeString(&DrivePathU, NtDrivePath); RtlInitUnicodeString(&DrivePathU, NtDrivePath);
DPRINT1("AUTOCHK: Checking %wZ\n", &DrivePathU); DPRINT("AUTOCHK: Checking %wZ\n", &DrivePathU);
Status = ChkdskFunc(&DrivePathU, Status = ChkdskFunc(&DrivePathU,
TRUE, // FixErrors TRUE, // FixErrors
TRUE, // Verbose TRUE, // Verbose

View file

@ -96,7 +96,7 @@ SmpCreatePagingFileDescriptor(IN PUNICODE_STRING PageFileToken)
} }
/* Parse the specified and get the name and arguments out of it */ /* Parse the specified and get the name and arguments out of it */
DPRINT1("SMSS:PFILE: Paging file specifier `%wZ' \n", PageFileToken); DPRINT("SMSS:PFILE: Paging file specifier `%wZ' \n", PageFileToken);
Status = SmpParseCommandLine(PageFileToken, Status = SmpParseCommandLine(PageFileToken,
NULL, NULL,
&PageFileName, &PageFileName,
@ -212,7 +212,7 @@ SmpCreatePagingFileDescriptor(IN PUNICODE_STRING PageFileToken)
/* This means no duplicates exist, so insert our descriptor! */ /* This means no duplicates exist, so insert our descriptor! */
InsertTailList(&SmpPagingFileDescriptorList, &Descriptor->Entry); InsertTailList(&SmpPagingFileDescriptorList, &Descriptor->Entry);
SmpNumberOfPagingFiles++; SmpNumberOfPagingFiles++;
DPRINT1("SMSS:PFILE: Created descriptor for `%wZ' (`%wZ') \n", DPRINT("SMSS:PFILE: Created descriptor for `%wZ' (`%wZ') \n",
PageFileToken, &Descriptor->Name); PageFileToken, &Descriptor->Name);
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
@ -241,7 +241,7 @@ SmpGetPagingFileSize(IN PUNICODE_STRING FileName,
HANDLE FileHandle; HANDLE FileHandle;
FILE_STANDARD_INFORMATION StandardInfo; FILE_STANDARD_INFORMATION StandardInfo;
DPRINT1("SMSS:PFILE: Trying to get size for `%wZ'\n", FileName); DPRINT("SMSS:PFILE: Trying to get size for `%wZ'\n", FileName);
Size->QuadPart = 0; Size->QuadPart = 0;
InitializeObjectAttributes(&ObjectAttributes, InitializeObjectAttributes(&ObjectAttributes,
@ -350,7 +350,7 @@ SmpGetVolumeFreeSpace(IN PSMP_VOLUME_DESCRIPTOR Volume)
VolumeName.Length = wcslen(PathString) * sizeof(WCHAR); VolumeName.Length = wcslen(PathString) * sizeof(WCHAR);
VolumeName.MaximumLength = VolumeName.Length + sizeof(UNICODE_NULL); VolumeName.MaximumLength = VolumeName.Length + sizeof(UNICODE_NULL);
VolumeName.Buffer[STANDARD_DRIVE_LETTER_OFFSET] = Volume->DriveLetter; VolumeName.Buffer[STANDARD_DRIVE_LETTER_OFFSET] = Volume->DriveLetter;
DPRINT1("SMSS:PFILE: Querying volume `%wZ' for free space \n", &VolumeName); DPRINT("SMSS:PFILE: Querying volume `%wZ' for free space \n", &VolumeName);
/* Open the volume */ /* Open the volume */
InitializeObjectAttributes(&ObjectAttributes, InitializeObjectAttributes(&ObjectAttributes,
@ -395,10 +395,6 @@ SmpGetVolumeFreeSpace(IN PSMP_VOLUME_DESCRIPTOR Volume)
SizeInfo.SectorsPerAllocationUnit; SizeInfo.SectorsPerAllocationUnit;
FinalFreeSpace.QuadPart = FreeSpace.QuadPart * SizeInfo.BytesPerSector; FinalFreeSpace.QuadPart = FreeSpace.QuadPart * SizeInfo.BytesPerSector;
Volume->FreeSpace = FinalFreeSpace; Volume->FreeSpace = FinalFreeSpace;
DPRINT1("AUs: %I64x Sectors: %lx Bytes Per Sector: %lx\n",
SizeInfo.AvailableAllocationUnits.QuadPart,
SizeInfo.SectorsPerAllocationUnit,
SizeInfo.BytesPerSector);
/* Check if there's less than 32MB free so we don't starve the disk */ /* Check if there's less than 32MB free so we don't starve the disk */
if (FinalFreeSpace.QuadPart <= 0x2000000) if (FinalFreeSpace.QuadPart <= 0x2000000)
@ -460,7 +456,7 @@ SmpCreatePagingFile(IN PUNICODE_STRING Name,
Status = NtCreatePagingFile(Name, MinSize, MaxSize, Priority); Status = NtCreatePagingFile(Name, MinSize, MaxSize, Priority);
if (NT_SUCCESS(Status)) if (NT_SUCCESS(Status))
{ {
DPRINT1("SMSS:PFILE: NtCreatePagingFile (%wZ, %I64X, %I64X) succeeded. \n", DPRINT("SMSS:PFILE: NtCreatePagingFile (%wZ, %I64X, %I64X) succeeded. \n",
Name, Name,
MinSize->QuadPart, MinSize->QuadPart,
MaxSize->QuadPart); MaxSize->QuadPart);
@ -508,7 +504,7 @@ SmpCreatePagingFileOnFixedDrive(IN PSMP_PAGEFILE_DESCRIPTOR Descriptor,
if (!(Descriptor->Flags & SMP_PAGEFILE_DUMP_PROCESSED)) if (!(Descriptor->Flags & SMP_PAGEFILE_DUMP_PROCESSED))
{ {
/* Try to find a crash dump and extract it */ /* Try to find a crash dump and extract it */
DPRINT1("SMSS:PFILE: Checking for crash dump in `%wZ' on boot volume \n", DPRINT("SMSS:PFILE: Checking for crash dump in `%wZ' on boot volume \n",
&Descriptor->Name); &Descriptor->Name);
SmpCheckForCrashDump(&Descriptor->Name); SmpCheckForCrashDump(&Descriptor->Name);
@ -521,7 +517,7 @@ SmpCreatePagingFileOnFixedDrive(IN PSMP_PAGEFILE_DESCRIPTOR Descriptor,
} }
else else
{ {
DPRINT1("Queried free space for boot volume `%wC: %I64x'\n", DPRINT("Queried free space for boot volume `%wC: %I64x'\n",
Volume->DriveLetter, Volume->FreeSpace.QuadPart); Volume->DriveLetter, Volume->FreeSpace.QuadPart);
} }
@ -532,7 +528,7 @@ SmpCreatePagingFileOnFixedDrive(IN PSMP_PAGEFILE_DESCRIPTOR Descriptor,
else else
{ {
/* Crashdumps can only be on the boot volume */ /* Crashdumps can only be on the boot volume */
DPRINT1("SMSS:PFILE: Skipping crash dump checking for `%wZ' on non boot" DPRINT("SMSS:PFILE: Skipping crash dump checking for `%wZ' on non boot"
"volume `%wC' \n", "volume `%wC' \n",
&Descriptor->Name, &Descriptor->Name,
Volume->DriveLetter); Volume->DriveLetter);
@ -545,10 +541,10 @@ SmpCreatePagingFileOnFixedDrive(IN PSMP_PAGEFILE_DESCRIPTOR Descriptor,
/* Check how big we can make the pagefile */ /* Check how big we can make the pagefile */
Status = SmpGetPagingFileSize(&Descriptor->Name, &PageFileSize); Status = SmpGetPagingFileSize(&Descriptor->Name, &PageFileSize);
if (PageFileSize.QuadPart > 0) ShouldDelete = TRUE; if (PageFileSize.QuadPart > 0) ShouldDelete = TRUE;
DPRINT1("SMSS:PFILE: Detected size %I64X for future paging file `%wZ'\n", DPRINT("SMSS:PFILE: Detected size %I64X for future paging file `%wZ'\n",
PageFileSize, PageFileSize,
&Descriptor->Name); &Descriptor->Name);
DPRINT1("SMSS:PFILE: Free space on volume `%wC' is %I64X \n", DPRINT("SMSS:PFILE: Free space on volume `%wC' is %I64X \n",
Volume->DriveLetter, Volume->DriveLetter,
Volume->FreeSpace.QuadPart); Volume->FreeSpace.QuadPart);
@ -562,7 +558,7 @@ SmpCreatePagingFileOnFixedDrive(IN PSMP_PAGEFILE_DESCRIPTOR Descriptor,
{ {
Descriptor->ActualMaxSize = PageFileSize; Descriptor->ActualMaxSize = PageFileSize;
} }
DPRINT1("SMSS:PFILE: min %I64X, max %I64X, real min %I64X \n", DPRINT("SMSS:PFILE: min %I64X, max %I64X, real min %I64X \n",
Descriptor->ActualMinSize.QuadPart, Descriptor->ActualMinSize.QuadPart,
Descriptor->ActualMaxSize.QuadPart, Descriptor->ActualMaxSize.QuadPart,
MinimumSize->QuadPart); MinimumSize->QuadPart);
@ -697,7 +693,7 @@ SmpValidatePagingFileSizes(IN PSMP_PAGEFILE_DESCRIPTOR Descriptor)
/* Capture the min and max */ /* Capture the min and max */
MinSize = Descriptor->MinSize.QuadPart; MinSize = Descriptor->MinSize.QuadPart;
MaxSize = Descriptor->MaxSize.QuadPart; MaxSize = Descriptor->MaxSize.QuadPart;
DPRINT1("SMSS:PFILE: Validating sizes for `%wZ' %I64X %I64X\n", DPRINT("SMSS:PFILE: Validating sizes for `%wZ' %I64X %I64X\n",
&Descriptor->Name, MinSize, MaxSize); &Descriptor->Name, MinSize, MaxSize);
/* Don't let minimum be bigger than maximum */ /* Don't let minimum be bigger than maximum */
@ -732,7 +728,7 @@ SmpValidatePagingFileSizes(IN PSMP_PAGEFILE_DESCRIPTOR Descriptor)
if (WasTooBig) if (WasTooBig)
{ {
/* Notify debugger output and write a flag in the descriptor */ /* Notify debugger output and write a flag in the descriptor */
DPRINT1("SMSS:PFILE: Trimmed size of `%wZ' to maximum allowed \n", DPRINT("SMSS:PFILE: Trimmed size of `%wZ' to maximum allowed \n",
&Descriptor->Name); &Descriptor->Name);
Descriptor->Flags |= SMP_PAGEFILE_WAS_TOO_BIG; Descriptor->Flags |= SMP_PAGEFILE_WAS_TOO_BIG;
} }
@ -972,10 +968,6 @@ SmpCreateVolumeDescriptors(VOID)
SizeInfo.SectorsPerAllocationUnit; SizeInfo.SectorsPerAllocationUnit;
FinalFreeSpace.QuadPart = FreeSpace.QuadPart * SizeInfo.BytesPerSector; FinalFreeSpace.QuadPart = FreeSpace.QuadPart * SizeInfo.BytesPerSector;
Volume->FreeSpace = FinalFreeSpace; Volume->FreeSpace = FinalFreeSpace;
DPRINT1("AUs: %I64x Sectors: %lx Bytes Per Sector: %lx\n",
SizeInfo.AvailableAllocationUnits.QuadPart,
SizeInfo.SectorsPerAllocationUnit,
SizeInfo.BytesPerSector);
/* Check if there's less than 32MB free so we don't starve the disk */ /* Check if there's less than 32MB free so we don't starve the disk */
if (FinalFreeSpace.QuadPart <= 0x2000000) if (FinalFreeSpace.QuadPart <= 0x2000000)
@ -992,7 +984,7 @@ SmpCreateVolumeDescriptors(VOID)
/* All done, add this volume to our descriptor list */ /* All done, add this volume to our descriptor list */
InsertTailList(&SmpVolumeDescriptorList, &Volume->Entry); InsertTailList(&SmpVolumeDescriptorList, &Volume->Entry);
Volume->Flags |= SMP_VOLUME_INSERTED; Volume->Flags |= SMP_VOLUME_INSERTED;
DPRINT1("SMSS:PFILE: Created volume descriptor for`%wZ' \n", &VolumePath); DPRINT("SMSS:PFILE: Created volume descriptor for`%wZ' \n", &VolumePath);
} }
/* We must've found at least the boot volume */ /* We must've found at least the boot volume */
@ -1045,7 +1037,7 @@ SmpCreatePagingFiles(VOID)
if (Descriptor->Flags & SMP_PAGEFILE_SYSTEM_MANAGED) if (Descriptor->Flags & SMP_PAGEFILE_SYSTEM_MANAGED)
{ {
/* This is a system-managed descriptor. Create the correct file */ /* This is a system-managed descriptor. Create the correct file */
DPRINT1("SMSS:PFILE: Creating a system managed paging file (`%wZ')\n", DPRINT("SMSS:PFILE: Creating a system managed paging file (`%wZ')\n",
&Descriptor->Name); &Descriptor->Name);
Status = SmpCreateSystemManagedPagingFile(Descriptor, FALSE); Status = SmpCreateSystemManagedPagingFile(Descriptor, FALSE);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
@ -1062,7 +1054,7 @@ SmpCreatePagingFiles(VOID)
SmpValidatePagingFileSizes(Descriptor); SmpValidatePagingFileSizes(Descriptor);
/* Check if this is an ANY pagefile or a FIXED pagefile */ /* Check if this is an ANY pagefile or a FIXED pagefile */
DPRINT1("SMSS:PFILE: Creating a normal paging file (`%wZ') \n", DPRINT("SMSS:PFILE: Creating a normal paging file (`%wZ') \n",
&Descriptor->Name); &Descriptor->Name);
if (Descriptor->Name.Buffer[STANDARD_DRIVE_LETTER_OFFSET] == L'?') if (Descriptor->Name.Buffer[STANDARD_DRIVE_LETTER_OFFSET] == L'?')
{ {

View file

@ -204,14 +204,12 @@ SmpHandleConnectionRequest(IN HANDLE SmApiPort,
if (SbApiMsg->h.ClientId.UniqueProcess == SmUniqueProcessId) if (SbApiMsg->h.ClientId.UniqueProcess == SmUniqueProcessId)
{ {
/* No need to get any handle -- assume session 0 */ /* No need to get any handle -- assume session 0 */
DPRINT1("SM connecting to SM\n");
ProcessHandle = NULL; ProcessHandle = NULL;
SessionId = 0; SessionId = 0;
} }
else else
{ {
/* Reference the foreign process */ /* Reference the foreign process */
DPRINT1("Incoming request from %lx\n", SbApiMsg->h.ClientId.UniqueProcess);
InitializeObjectAttributes(&ObjectAttributes, NULL, 0, NULL, NULL); InitializeObjectAttributes(&ObjectAttributes, NULL, 0, NULL, NULL);
Status = NtOpenProcess(&ProcessHandle, Status = NtOpenProcess(&ProcessHandle,
PROCESS_QUERY_INFORMATION, PROCESS_QUERY_INFORMATION,
@ -274,7 +272,6 @@ SmpHandleConnectionRequest(IN HANDLE SmApiPort,
/* Now send the actual accept reply (which could be a rejection) */ /* Now send the actual accept reply (which could be a rejection) */
PortView.Length = sizeof(PortView); PortView.Length = sizeof(PortView);
DPRINT1("Accepting: %d connection with context: %p\n", Accept, ClientContext);
Status = NtAcceptConnectPort(&PortHandle, Status = NtAcceptConnectPort(&PortHandle,
ClientContext, ClientContext,
&SbApiMsg->h, &SbApiMsg->h,
@ -303,7 +300,6 @@ SmpHandleConnectionRequest(IN HANDLE SmApiPort,
SbApiMsg->ConnectionInfo.SbApiPortName[119] = UNICODE_NULL; SbApiMsg->ConnectionInfo.SbApiPortName[119] = UNICODE_NULL;
RtlCreateUnicodeString(&SubsystemPort, RtlCreateUnicodeString(&SubsystemPort,
SbApiMsg->ConnectionInfo.SbApiPortName); SbApiMsg->ConnectionInfo.SbApiPortName);
DPRINT1("Connecting back to %wZ\n", &SubsystemPort);
Status = NtConnectPort(&CidSubsystem->SbApiPort, Status = NtConnectPort(&CidSubsystem->SbApiPort,
&SubsystemPort, &SubsystemPort,
&SecurityQos, &SecurityQos,
@ -363,7 +359,6 @@ SmpApiLoop(IN PVOID Parameter)
while (TRUE) while (TRUE)
{ {
/* Begin waiting on a request */ /* Begin waiting on a request */
DPRINT1("API Loop: %p\n", SmApiPort);
Status = NtReplyWaitReceivePort(SmApiPort, Status = NtReplyWaitReceivePort(SmApiPort,
(PVOID*)&ClientContext, (PVOID*)&ClientContext,
&ReplyMsg->h, &ReplyMsg->h,
@ -383,7 +378,6 @@ SmpApiLoop(IN PVOID Parameter)
/* A new connection */ /* A new connection */
case LPC_CONNECTION_REQUEST: case LPC_CONNECTION_REQUEST:
/* Create the right structures for it */ /* Create the right structures for it */
DPRINT1("New connection request\n");
SmpHandleConnectionRequest(SmApiPort, (PSB_API_MSG)&RequestMsg); SmpHandleConnectionRequest(SmApiPort, (PSB_API_MSG)&RequestMsg);
ReplyMsg = NULL; ReplyMsg = NULL;
break; break;
@ -423,7 +417,6 @@ SmpApiLoop(IN PVOID Parameter)
else else
{ {
/* It's totally okay, so call the dispatcher for it */ /* It's totally okay, so call the dispatcher for it */
DPRINT1("Calling dispatcher for ID: %lx\n", RequestMsg.ApiNumber);
Status = SmpApiDispatch[RequestMsg.ApiNumber](&RequestMsg, Status = SmpApiDispatch[RequestMsg.ApiNumber](&RequestMsg,
ClientContext, ClientContext,
SmApiPort); SmApiPort);

View file

@ -47,7 +47,6 @@ SmpExecuteImage(IN PUNICODE_STRING FileName,
NTSTATUS Status; NTSTATUS Status;
RTL_USER_PROCESS_INFORMATION LocalProcessInfo; RTL_USER_PROCESS_INFORMATION LocalProcessInfo;
PRTL_USER_PROCESS_PARAMETERS ProcessParameters; PRTL_USER_PROCESS_PARAMETERS ProcessParameters;
DPRINT1("Executing image: %wZ\n", FileName);
/* Use the input process information if we have it, otherwise use local */ /* Use the input process information if we have it, otherwise use local */
ProcessInfo = ProcessInformation; ProcessInfo = ProcessInformation;

View file

@ -150,7 +150,6 @@ SmpLoadSubSystem(IN PUNICODE_STRING FileName,
PVOID State; PVOID State;
PSB_CREATE_PROCESS_MSG CreateProcess = &SbApiMsg.CreateProcess; PSB_CREATE_PROCESS_MSG CreateProcess = &SbApiMsg.CreateProcess;
PSB_CREATE_SESSION_MSG CreateSession = &SbApiMsg.CreateSession; PSB_CREATE_SESSION_MSG CreateSession = &SbApiMsg.CreateSession;
DPRINT1("Loading subsystem: %wZ\n", FileName);
/* Make sure this is a found subsystem */ /* Make sure this is a found subsystem */
if (Flags & SMP_INVALID_PATH) if (Flags & SMP_INVALID_PATH)
@ -202,7 +201,6 @@ SmpLoadSubSystem(IN PUNICODE_STRING FileName,
/* Allocate a new subsystem! */ /* Allocate a new subsystem! */
NewSubsystem = RtlAllocateHeap(SmpHeap, SmBaseTag, sizeof(SMP_SUBSYSTEM)); NewSubsystem = RtlAllocateHeap(SmpHeap, SmBaseTag, sizeof(SMP_SUBSYSTEM));
DPRINT1("new subsystem created: %p\n", NewSubsystem);
if (!NewSubsystem) if (!NewSubsystem)
{ {
RtlLeaveCriticalSection(&SmpKnownSubSysLock); RtlLeaveCriticalSection(&SmpKnownSubSysLock);
@ -279,7 +277,6 @@ SmpLoadSubSystem(IN PUNICODE_STRING FileName,
else else
{ {
/* This must be CSRSS itself, so just launch it and that's it */ /* This must be CSRSS itself, so just launch it and that's it */
DPRINT1("Executing CSRSS\n");
Status = SmpExecuteImage(FileName, Status = SmpExecuteImage(FileName,
Directory, Directory,
CommandLine, CommandLine,
@ -314,7 +311,6 @@ SmpLoadSubSystem(IN PUNICODE_STRING FileName,
SmpWindowsSubSysProcess = ProcessInformation.ProcessHandle; SmpWindowsSubSysProcess = ProcessInformation.ProcessHandle;
} }
ASSERT(NT_SUCCESS(Status)); ASSERT(NT_SUCCESS(Status));
DPRINT1("CSRSS is up and running: %lx %lx\n", SmpWindowsSubSysProcessId, SmpWindowsSubSysProcess);
} }
else else
{ {
@ -399,7 +395,6 @@ SmpLoadSubSystem(IN PUNICODE_STRING FileName,
} }
/* Okay, everything looks good to go, initialize this subsystem now! */ /* Okay, everything looks good to go, initialize this subsystem now! */
DPRINT1("Resuming the subsystem!\n");
Status = NtResumeThread(ProcessInformation.ThreadHandle, NULL); Status = NtResumeThread(ProcessInformation.ThreadHandle, NULL);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
@ -436,15 +431,12 @@ SmpLoadSubSystem(IN PUNICODE_STRING FileName,
else else
{ {
/* This a session 0 subsystem, just wait for it to initialize */ /* This a session 0 subsystem, just wait for it to initialize */
DPRINT1("Waiting on the subsystem to initialize...\n");
NtWaitForSingleObject(NewSubsystem->Event, FALSE, NULL); NtWaitForSingleObject(NewSubsystem->Event, FALSE, NULL);
DPRINT1("Subsystem is ready!!!\n");
} }
/* Subsystem is created, resumed, and initialized. Close handles and exit */ /* Subsystem is created, resumed, and initialized. Close handles and exit */
NtClose(ProcessInformation.ThreadHandle); NtClose(ProcessInformation.ThreadHandle);
Status = STATUS_SUCCESS; Status = STATUS_SUCCESS;
DPRINT1("Returning success\n");
goto Quickie2; goto Quickie2;
Quickie: Quickie:
@ -537,7 +529,6 @@ SmpLoadSubSystemsForMuSession(IN PULONG MuSessionId,
{ {
/* Execute each one and move on */ /* Execute each one and move on */
RegEntry = CONTAINING_RECORD(NextEntry, SMP_REGISTRY_VALUE, Entry); RegEntry = CONTAINING_RECORD(NextEntry, SMP_REGISTRY_VALUE, Entry);
DPRINT1("SetupExecute entry: %wZ\n", &RegEntry->Name);
SmpExecuteCommand(&RegEntry->Name, 0, NULL, 0); SmpExecuteCommand(&RegEntry->Name, 0, NULL, 0);
NextEntry = NextEntry->Flink; NextEntry = NextEntry->Flink;
} }
@ -548,7 +539,6 @@ SmpLoadSubSystemsForMuSession(IN PULONG MuSessionId,
{ {
/* Get the entry and check if this is the special Win32k entry */ /* Get the entry and check if this is the special Win32k entry */
RegEntry = CONTAINING_RECORD(NextEntry, SMP_REGISTRY_VALUE, Entry); RegEntry = CONTAINING_RECORD(NextEntry, SMP_REGISTRY_VALUE, Entry);
DPRINT1("Subsystem: %wZ\n", &RegEntry->Name);
if (!_wcsicmp(RegEntry->Name.Buffer, L"Kmode")) if (!_wcsicmp(RegEntry->Name.Buffer, L"Kmode"))
{ {
/* Translate it */ /* Translate it */
@ -581,7 +571,6 @@ SmpLoadSubSystemsForMuSession(IN PULONG MuSessionId,
AttachedSessionId = *MuSessionId; AttachedSessionId = *MuSessionId;
/* Start Win32k.sys on this session */ /* Start Win32k.sys on this session */
DPRINT1("Starting win32k.sys...\n");
RtlInitUnicodeString(&DestinationString, RtlInitUnicodeString(&DestinationString,
L"\\SystemRoot\\System32\\win32k.sys"); L"\\SystemRoot\\System32\\win32k.sys");
Status = NtSetSystemInformation(SystemExtendServiceTableInformation, Status = NtSetSystemInformation(SystemExtendServiceTableInformation,
@ -608,7 +597,6 @@ SmpLoadSubSystemsForMuSession(IN PULONG MuSessionId,
{ {
/* Get each entry and check if it's the internal debug or not */ /* Get each entry and check if it's the internal debug or not */
RegEntry = CONTAINING_RECORD(NextEntry, SMP_REGISTRY_VALUE, Entry); RegEntry = CONTAINING_RECORD(NextEntry, SMP_REGISTRY_VALUE, Entry);
DPRINT1("Subsystem (required): %wZ\n", &RegEntry->Name);
if (_wcsicmp(RegEntry->Name.Buffer, L"debug")) if (_wcsicmp(RegEntry->Name.Buffer, L"debug"))
{ {
/* Load the required subsystem */ /* Load the required subsystem */
@ -641,7 +629,6 @@ SmpLoadSubSystemsForMuSession(IN PULONG MuSessionId,
{ {
/* Get the custom initial command */ /* Get the custom initial command */
RegEntry = CONTAINING_RECORD(NextEntry, SMP_REGISTRY_VALUE, Entry); RegEntry = CONTAINING_RECORD(NextEntry, SMP_REGISTRY_VALUE, Entry);
DPRINT1("Initial command found: %wZ\n", &RegEntry->Name);
/* Write the initial command and wait for 5 seconds (why??!) */ /* Write the initial command and wait for 5 seconds (why??!) */
*InitialCommand = RegEntry->Name; *InitialCommand = RegEntry->Name;
@ -653,7 +640,6 @@ SmpLoadSubSystemsForMuSession(IN PULONG MuSessionId,
/* Use the default Winlogon initial command */ /* Use the default Winlogon initial command */
RtlInitUnicodeString(InitialCommand, L"winlogon.exe"); RtlInitUnicodeString(InitialCommand, L"winlogon.exe");
InitialCommandBuffer[0] = UNICODE_NULL; InitialCommandBuffer[0] = UNICODE_NULL;
DPRINT1("Initial command found: %wZ\n", InitialCommand);
/* Check if there's a debugger for Winlogon */ /* Check if there's a debugger for Winlogon */
Status2 = LdrQueryImageFileExecutionOptions(InitialCommand, Status2 = LdrQueryImageFileExecutionOptions(InitialCommand,
@ -678,7 +664,6 @@ SmpLoadSubSystemsForMuSession(IN PULONG MuSessionId,
{ {
/* Execute each one */ /* Execute each one */
RegEntry = CONTAINING_RECORD(NextEntry, SMP_REGISTRY_VALUE, Entry); RegEntry = CONTAINING_RECORD(NextEntry, SMP_REGISTRY_VALUE, Entry);
DPRINT1("Initial command (custom): %wZ\n", &RegEntry->Name);
SmpExecuteCommand(&RegEntry->Name, *MuSessionId, NULL, 0); SmpExecuteCommand(&RegEntry->Name, *MuSessionId, NULL, 0);
NextEntry = NextEntry->Flink; NextEntry = NextEntry->Flink;
} }