mirror of
https://github.com/reactos/reactos.git
synced 2025-07-04 16:31:21 +00:00
SM some simple work (wip)
svn path=/trunk/; revision=13762
This commit is contained in:
parent
0cd607f519
commit
b6701ec6f9
5 changed files with 28 additions and 11 deletions
|
@ -169,6 +169,8 @@ SmCreateClient(PSM_PORT_MESSAGE Request, PSM_CLIENT_DATA * ClientData)
|
||||||
* Initialize the client data
|
* Initialize the client data
|
||||||
*/
|
*/
|
||||||
pClient->SubsystemId = ConnectData->Subsystem;
|
pClient->SubsystemId = ConnectData->Subsystem;
|
||||||
|
/* SM auto-initializes; other subsystems are required to call
|
||||||
|
* SM_API_COMPLETE_SESSION via SMDLL. */
|
||||||
pClient->Initialized = (IMAGE_SUBSYSTEM_NATIVE == pClient->SubsystemId);
|
pClient->Initialized = (IMAGE_SUBSYSTEM_NATIVE == pClient->SubsystemId);
|
||||||
if (SbApiPortNameSize > 0)
|
if (SbApiPortNameSize > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,14 +36,14 @@
|
||||||
static NTSTATUS
|
static NTSTATUS
|
||||||
SmpSignalInitEvent(VOID)
|
SmpSignalInitEvent(VOID)
|
||||||
{
|
{
|
||||||
NTSTATUS Status;
|
NTSTATUS Status = STATUS_SUCCESS;
|
||||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
OBJECT_ATTRIBUTES ObjectAttributes = {0};
|
||||||
UNICODE_STRING UnicodeString;
|
UNICODE_STRING EventName ={0};
|
||||||
HANDLE ReactOSInitEvent;
|
HANDLE ReactOSInitEvent = NULL;
|
||||||
|
|
||||||
RtlRosInitUnicodeStringFromLiteral(&UnicodeString, L"\\ReactOSInitDone");
|
RtlInitUnicodeString (& EventName, L"\\ReactOSInitDone");
|
||||||
InitializeObjectAttributes(&ObjectAttributes,
|
InitializeObjectAttributes(&ObjectAttributes,
|
||||||
&UnicodeString,
|
& EventName,
|
||||||
EVENT_ALL_ACCESS,
|
EVENT_ALL_ACCESS,
|
||||||
0,
|
0,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
|
@ -23,8 +23,6 @@
|
||||||
*
|
*
|
||||||
* --------------------------------------------------------------------
|
* --------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "smss.h"
|
#include "smss.h"
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
|
@ -82,7 +80,7 @@ SmCreateObjectDirectories(VOID)
|
||||||
QueryTable[0].QueryRoutine = SmpObjectDirectoryQueryRoutine;
|
QueryTable[0].QueryRoutine = SmpObjectDirectoryQueryRoutine;
|
||||||
|
|
||||||
Status = RtlQueryRegistryValues(RTL_REGISTRY_CONTROL,
|
Status = RtlQueryRegistryValues(RTL_REGISTRY_CONTROL,
|
||||||
L"\\Session Manager",
|
SM_REGISTRY_ROOT_NAME,
|
||||||
QueryTable,
|
QueryTable,
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
|
@ -30,18 +30,32 @@
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
|
HANDLE SmSsProcessId = 0;
|
||||||
|
|
||||||
/* Native image's entry point */
|
/* Native image's entry point */
|
||||||
|
|
||||||
VOID STDCALL
|
VOID STDCALL
|
||||||
NtProcessStartup(PPEB Peb)
|
NtProcessStartup(PPEB Peb)
|
||||||
{
|
{
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
PROCESS_BASIC_INFORMATION PBI = {0};
|
||||||
|
|
||||||
DisplayString(L"SMSS\n");
|
DisplayString(L"SMSS\n");
|
||||||
PrintString("ReactOS Session Manager %s (Build %s)\n",
|
PrintString("ReactOS Session Manager %s (Build %s)\n",
|
||||||
KERNEL_RELEASE_STR,
|
KERNEL_RELEASE_STR,
|
||||||
KERNEL_VERSION_BUILD_STR);
|
KERNEL_VERSION_BUILD_STR);
|
||||||
|
|
||||||
|
/* Lookup yourself */
|
||||||
|
Status = NtQueryInformationProcess (NtCurrentProcess(),
|
||||||
|
ProcessBasicInformation,
|
||||||
|
& PBI,
|
||||||
|
sizeof PBI,
|
||||||
|
NULL);
|
||||||
|
if(NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
SmSsProcessId = PBI.UniqueProcessId;
|
||||||
|
}
|
||||||
|
/* Initialize the system */
|
||||||
Status = InitSessionManager();
|
Status = InitSessionManager();
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
|
@ -64,7 +78,7 @@ NtProcessStartup(PPEB Peb)
|
||||||
NULL); /* NULL for infinite */
|
NULL); /* NULL for infinite */
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("SM: NtWaitForMultipleObjects failed!\n");
|
DPRINT1("SM: NtWaitForMultipleObjects failed! (Status=0x%08lx)\n", Status);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,6 +9,9 @@
|
||||||
#define CHILD_CSRSS 0
|
#define CHILD_CSRSS 0
|
||||||
#define CHILD_WINLOGON 1
|
#define CHILD_WINLOGON 1
|
||||||
|
|
||||||
|
/* smss.c */
|
||||||
|
extern HANDLE SmSsProcessId;
|
||||||
|
|
||||||
/* init.c */
|
/* init.c */
|
||||||
NTSTATUS InitSessionManager(VOID);
|
NTSTATUS InitSessionManager(VOID);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue