[ros-dev] [ros-diffs] [hbelusca] 58235: [SMSS] Load the Win32k driver from the path mentioned in the Kmode value of the registry, not via a hardcoded value.
Alex Ionescu
ionucu at videotron.ca
Sun Jan 27 06:58:54 UTC 2013
This change is not correct. The kmode value is ignored and the system
call only accepts the hardcoded path.
I've asked you repeatedly to review with me before you change my code.
Best regards,
Alex Ionescu
On Sat, Jan 26, 2013 at 3:43 PM, <hbelusca at svn.reactos.org> wrote:
> 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.c?rev=58235&r1=58234&r2=58235&view=diff
> ==============================================================================
> --- 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))
> {
>
>
More information about the Ros-dev
mailing list