Author: hbelusca
Date: Sat Jan 26 23:43:28 2013
New Revision: 58235
URL:
http://svn.reactos.org/svn/reactos?rev=58235&view=rev
Log:
[SMSS]
Load the Win32k driver from the path mentioned in the Kmode value of the registry, not via
a hardcoded value.
Modified:
trunk/reactos/base/system/smss/smsubsys.c
Modified: trunk/reactos/base/system/smss/smsubsys.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss/smsubsys.…
==============================================================================
--- trunk/reactos/base/system/smss/smsubsys.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/smss/smsubsys.c [iso-8859-1] Sat Jan 26 23:43:28 2013
@@ -515,7 +515,7 @@
{
NTSTATUS Status = STATUS_SUCCESS, Status2;
PSMP_REGISTRY_VALUE RegEntry;
- UNICODE_STRING DestinationString, NtPath;
+ UNICODE_STRING NtPath;
PLIST_ENTRY NextEntry;
LARGE_INTEGER Timeout;
PVOID State;
@@ -539,7 +539,7 @@
{
/* Get the entry and check if this is the special Win32k entry */
RegEntry = CONTAINING_RECORD(NextEntry, SMP_REGISTRY_VALUE, Entry);
- if (!_wcsicmp(RegEntry->Name.Buffer, L"Kmode"))
+ if (_wcsicmp(RegEntry->Name.Buffer, L"Kmode") == 0)
{
/* Translate it */
if (!RtlDosPathNameToNtPathName_U(RegEntry->Value.Buffer,
@@ -571,11 +571,9 @@
AttachedSessionId = *MuSessionId;
/* Start Win32k.sys on this session */
- RtlInitUnicodeString(&DestinationString,
-
L"\\SystemRoot\\System32\\win32k.sys");
Status = NtSetSystemInformation(SystemExtendServiceTableInformation,
- &DestinationString,
- sizeof(DestinationString));
+ &NtPath,
+ sizeof(NtPath));
RtlFreeHeap(RtlGetProcessHeap(), 0, NtPath.Buffer);
SmpReleasePrivilege(State);
if (!NT_SUCCESS(Status))
@@ -597,21 +595,21 @@
{
/* Get each entry and check if it's the internal debug or not */
RegEntry = CONTAINING_RECORD(NextEntry, SMP_REGISTRY_VALUE, Entry);
- if (_wcsicmp(RegEntry->Name.Buffer, L"debug"))
+ if (_wcsicmp(RegEntry->Name.Buffer, L"debug") == 0)
+ {
+ /* Load the internal debug system */
+ Status = SmpExecuteCommand(&RegEntry->Value,
+ *MuSessionId,
+ ProcessId,
+ SMP_DEBUG_FLAG | SMP_SUBSYSTEM_FLAG);
+ }
+ else
{
/* Load the required subsystem */
Status = SmpExecuteCommand(&RegEntry->Value,
*MuSessionId,
ProcessId,
SMP_SUBSYSTEM_FLAG);
- }
- else
- {
- /* Load the internal debug system */
- Status = SmpExecuteCommand(&RegEntry->Value,
- *MuSessionId,
- ProcessId,
- SMP_DEBUG_FLAG | SMP_SUBSYSTEM_FLAG);
}
if (!NT_SUCCESS(Status))
{