mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 07:03:10 +00:00
[SMSS] Fix three SmpLoadSubSystem bugs related to the SB_CREATE_SESSION callback.
This fixes starting the Windows 2000 POSIX subsystem in ReactOS. - The CreateSession pointer was initialized against the SbApiMsg variable, but it was the other SbApiMsg2 that was being initialized and sent through LPC. - Do not overwrite the MuSessionId (Terminal Services session ID) variable with the generated environment subsystem session ID from SmpAllocateSessionId(). - Actually initialize the SbApiMsg ApiNumber for the CreateSession LPC call. (dll\win32\kernel32\client\proc.c:3690) Retrying with: POSIX /P C:\ReactOS\system32\posix\ls.exe /C ls Breakpoint 1 hit csrsrv!CsrSbApiRequestThread+0x64: 001b:1000ac34 837dfc00 cmp dword ptr [ebp-4],0 kd> ??ReceiveMsg struct _SB_API_MSG +0x000 h : _PORT_MESSAGE +0x018 ConnectionInfo : _SB_CONNECTION_INFO +0x018 ApiNumber : 0xcccccccc (No matching name) +0x01c ReturnValue : 0n0 +0x020 u : <unnamed-tag> kd> p ... (base\system\smss\smsubsys.c:393) SMSS: SmpLoadSubSystem - NtRequestWaitReplyPort Failed with Status c0000002 for sessionid 2 ... <Retrying> ... (base\system\smss\smsubsys.c:393) SMSS: SmpLoadSubSystem - NtRequestWaitReplyPort Failed with Status c0000002 for sessionid 3 All those bugs could have been avoided *IF*, rather than (badly) duplicating its code, the existing SmpSbCreateSession() function had been used instead. - "Not sure these field mean what I think they do -- but clear them" ... ◔_◔ Those fields are related to the debug client interface (DbgUi) and session in case the subsystem being started is going to be debugged. These have nothing to do with the MuSessionId. Clarify this in the SB_CREATE_SESSION_MSG structure and in the SmpSbCreateSession() function.
This commit is contained in:
parent
f43ce46566
commit
2dddbd5c54
4 changed files with 46 additions and 39 deletions
|
@ -159,9 +159,9 @@ typedef struct _SB_CREATE_SESSION_MSG
|
|||
{
|
||||
ULONG SessionId;
|
||||
RTL_USER_PROCESS_INFORMATION ProcessInfo;
|
||||
PVOID Unknown;
|
||||
ULONG MuSessionId;
|
||||
CLIENT_ID ClientId;
|
||||
PVOID Reserved;
|
||||
ULONG DbgSessionId;
|
||||
CLIENT_ID DbgUiClientId;
|
||||
} SB_CREATE_SESSION_MSG, *PSB_CREATE_SESSION_MSG;
|
||||
#ifndef _WIN64
|
||||
C_ASSERT(sizeof(SB_CREATE_SESSION_MSG) == 0x58);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue