[ros-diffs] [ion] 55455: [SMSS]: Nuke the environment code and instead inherit SMSS2's, which does all the right things. #if 0 all the non-used code, and nuke support for the "debug" subsystem as well as the c...

ion at svn.reactos.org ion at svn.reactos.org
Mon Feb 6 09:29:34 UTC 2012


Author: ion
Date: Mon Feb  6 09:29:33 2012
New Revision: 55455

URL: http://svn.reactos.org/svn/reactos?rev=55455&view=rev
Log:
[SMSS]: Nuke the environment code and instead inherit SMSS2's, which does all the right things. #if 0 all the non-used code, and nuke support for the "debug" subsystem as well as the custom "SmQuery" APIs.
[SMSS2]: Use SMSS2's environment when creating SMSS.

Modified:
    trunk/reactos/base/system/smss/client.c
    trunk/reactos/base/system/smss/debug.c
    trunk/reactos/base/system/smss/init.c
    trunk/reactos/base/system/smss/initdosdev.c
    trunk/reactos/base/system/smss/initenv.c
    trunk/reactos/base/system/smss/initmv.c
    trunk/reactos/base/system/smss/initobdir.c
    trunk/reactos/base/system/smss/initpage.c
    trunk/reactos/base/system/smss/initreg.c
    trunk/reactos/base/system/smss/initrun.c
    trunk/reactos/base/system/smss/initwkdll.c
    trunk/reactos/base/system/smss/print.c
    trunk/reactos/base/system/smss/smapi.c
    trunk/reactos/base/system/smss/smapiexec.c
    trunk/reactos/base/system/smss/smapiquery.c
    trunk/reactos/base/system/smss2/smss.c

Modified: trunk/reactos/base/system/smss/client.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss/client.c?rev=55455&r1=55454&r2=55455&view=diff
==============================================================================
--- trunk/reactos/base/system/smss/client.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/smss/client.c [iso-8859-1] Mon Feb  6 09:29:33 2012
@@ -500,7 +500,7 @@
 	RtlLeaveCriticalSection (& SmpClientDirectory.Lock);
 	return Status;
 }
-
+#if 0
 /* === Utilities for SmQryInfo === */
 
 /**********************************************************************
@@ -566,5 +566,5 @@
 	RtlLeaveCriticalSection (& SmpClientDirectory.Lock);
 	return Status;
 }
-
+#endif
 /* EOF */

Modified: trunk/reactos/base/system/smss/debug.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss/debug.c?rev=55455&r1=55454&r2=55455&view=diff
==============================================================================
--- trunk/reactos/base/system/smss/debug.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/smss/debug.c [iso-8859-1] Mon Feb  6 09:29:33 2012
@@ -12,6 +12,7 @@
 #define NDEBUG
 #include <debug.h>
 
+#if 0
 
 /* GLOBALS ***********************************************************/
 
@@ -164,5 +165,7 @@
 	return STATUS_SUCCESS;
 }
 
+#endif
+
 /* EOF */
 

Modified: trunk/reactos/base/system/smss/init.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss/init.c?rev=55455&r1=55454&r2=55455&view=diff
==============================================================================
--- trunk/reactos/base/system/smss/init.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/smss/init.c [iso-8859-1] Mon Feb  6 09:29:33 2012
@@ -30,7 +30,7 @@
 //	{TRUE,  SmInitDosDevices,             "create dos device links"},
 //	{TRUE,  SmRunBootApplications,        "run boot applications"},
 //	{TRUE,  SmProcessFileRenameList,      "process the file rename list"},
-	{FALSE, SmUpdateEnvironment,          "update environment variables"},
+//	{FALSE, SmUpdateEnvironment,          "update environment variables"},
 //	{FALSE, SmLoadKnownDlls,              "preload system DLLs"},
 //	{TRUE,  SmCreatePagingFiles,          "create paging files"},
 //	{TRUE,  SmInitializeRegistry,         "initialize the registry"},

Modified: trunk/reactos/base/system/smss/initdosdev.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss/initdosdev.c?rev=55455&r1=55454&r2=55455&view=diff
==============================================================================
--- trunk/reactos/base/system/smss/initdosdev.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/smss/initdosdev.c [iso-8859-1] Mon Feb  6 09:29:33 2012
@@ -11,6 +11,8 @@
 
 #define NDEBUG
 #include <debug.h>
+
+#if 0
 
 static NTSTATUS NTAPI
 SmpDosDevicesQueryRoutine(PWSTR ValueName,
@@ -89,4 +91,6 @@
   return(Status);
 }
 
+#endif
+
 /* EOF */

Modified: trunk/reactos/base/system/smss/initenv.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss/initenv.c?rev=55455&r1=55454&r2=55455&view=diff
==============================================================================
--- trunk/reactos/base/system/smss/initenv.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/smss/initenv.c [iso-8859-1] Mon Feb  6 09:29:33 2012
@@ -22,9 +22,11 @@
 NTSTATUS
 SmCreateEnvironment(VOID)
 {
-    return RtlCreateEnvironment(FALSE, &SmSystemEnvironment);
-}
-
+    return RtlCreateEnvironment(TRUE, &SmSystemEnvironment);
+}
+
+
+#if 0
 
 static NTSTATUS
 SmpSetEnvironmentVariable(IN PVOID Context,
@@ -60,7 +62,6 @@
     DPRINT("ValueData '%S'\n", (PWSTR)ValueData);
     return SmpSetEnvironmentVariable(Context,ValueName,(PWSTR)ValueData);
 }
-
 
 NTSTATUS
 SmSetEnvironmentVariables(VOID)
@@ -280,14 +281,13 @@
     return Status;
 }
 
-
 /**********************************************************************
  *  Set environment variables from registry
  */
 NTSTATUS
 SmUpdateEnvironment(VOID)
 {
-    RTL_QUERY_REGISTRY_TABLE QueryTable[2];
+    //RTL_QUERY_REGISTRY_TABLE QueryTable[2];
     WCHAR ValueBuffer[MAX_PATH];
     NTSTATUS Status;
 #ifndef NDEBUG
@@ -343,5 +343,5 @@
 
     return Status;
 }
-
+#endif
 /* EOF */

Modified: trunk/reactos/base/system/smss/initmv.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss/initmv.c?rev=55455&r1=55454&r2=55455&view=diff
==============================================================================
--- trunk/reactos/base/system/smss/initmv.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/smss/initmv.c [iso-8859-1] Mon Feb  6 09:29:33 2012
@@ -12,6 +12,7 @@
 #define NDEBUG
 #include <debug.h>
 
+#if 0
 
 /* FUNCTIONS *****************************************************************/
 
@@ -446,4 +447,6 @@
 	return (STATUS_SUCCESS);
 }
 
+#endif
+
 /* EOF */

Modified: trunk/reactos/base/system/smss/initobdir.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss/initobdir.c?rev=55455&r1=55454&r2=55455&view=diff
==============================================================================
--- trunk/reactos/base/system/smss/initobdir.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/smss/initobdir.c [iso-8859-1] Mon Feb  6 09:29:33 2012
@@ -12,6 +12,7 @@
 #define NDEBUG
 #include <debug.h>
 
+#if 0
 static NTSTATUS NTAPI
 SmpObjectDirectoryQueryRoutine(PWSTR ValueName,
 			      ULONG ValueType,
@@ -69,5 +70,6 @@
 
   return(Status);
 }
+#endif
 
 /* EOF */

Modified: trunk/reactos/base/system/smss/initpage.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss/initpage.c?rev=55455&r1=55454&r2=55455&view=diff
==============================================================================
--- trunk/reactos/base/system/smss/initpage.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/smss/initpage.c [iso-8859-1] Mon Feb  6 09:29:33 2012
@@ -11,6 +11,8 @@
 
 #define NDEBUG
 #include <debug.h>
+
+#if 0
 
 #define GIGABYTE (1024 * 1024 * 1024) /* One Gigabyte */
 
@@ -520,6 +522,6 @@
 
     return Status;
 }
-
+#endif
 
 /* EOF */

Modified: trunk/reactos/base/system/smss/initreg.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss/initreg.c?rev=55455&r1=55454&r2=55455&view=diff
==============================================================================
--- trunk/reactos/base/system/smss/initreg.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/smss/initreg.c [iso-8859-1] Mon Feb  6 09:29:33 2012
@@ -12,6 +12,7 @@
 #define NDEBUG
 #include <debug.h>
 
+#if 0
 NTSTATUS
 SmInitializeRegistry(VOID)
 {
@@ -20,5 +21,6 @@
   /* Load remaining registry hives */
   return NtInitializeRegistry(CM_BOOT_FLAG_SMSS);
 }
+#endif
 
 /* EOF */

Modified: trunk/reactos/base/system/smss/initrun.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss/initrun.c?rev=55455&r1=55454&r2=55455&view=diff
==============================================================================
--- trunk/reactos/base/system/smss/initrun.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/smss/initrun.c [iso-8859-1] Mon Feb  6 09:29:33 2012
@@ -12,6 +12,7 @@
 #define NDEBUG
 #include <debug.h>
 
+#if 0
 //HANDLE Children[2] = {0, 0}; /* csrss, winlogon */
 
 
@@ -223,6 +224,6 @@
 
   return(Status);
 }
-
+#endif
 
 /* EOF */

Modified: trunk/reactos/base/system/smss/initwkdll.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss/initwkdll.c?rev=55455&r1=55454&r2=55455&view=diff
==============================================================================
--- trunk/reactos/base/system/smss/initwkdll.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/smss/initwkdll.c [iso-8859-1] Mon Feb  6 09:29:33 2012
@@ -12,6 +12,7 @@
 #define NDEBUG
 #include <debug.h>
 
+#if 0
 static NTSTATUS NTAPI
 SmpKnownDllsQueryRoutine(PWSTR ValueName,
 			ULONG ValueType,
@@ -236,6 +237,6 @@
 
   return Status;
 }
-
+#endif
 
 /* EOF */

Modified: trunk/reactos/base/system/smss/print.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss/print.c?rev=55455&r1=55454&r2=55455&view=diff
==============================================================================
--- trunk/reactos/base/system/smss/print.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/smss/print.c [iso-8859-1] Mon Feb  6 09:29:33 2012
@@ -12,6 +12,7 @@
 #define NDEBUG
 #include <debug.h>
 
+#if 0
 VOID NTAPI DisplayString(LPCWSTR lpwString)
 {
    UNICODE_STRING us;
@@ -39,5 +40,6 @@
    NtDisplayString(&UnicodeString);
    RtlFreeUnicodeString (&UnicodeString);
 }
+#endif
 
 /* EOF */

Modified: trunk/reactos/base/system/smss/smapi.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss/smapi.c?rev=55455&r1=55454&r2=55455&view=diff
==============================================================================
--- trunk/reactos/base/system/smss/smapi.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/smss/smapi.c [iso-8859-1] Mon Feb  6 09:29:33 2012
@@ -35,7 +35,7 @@
     SmInvalid,	/* obsolete */
     SmInvalid,	/* unknown */
     SmExecPgm,	/* smapiexec.c */
-    SmQryInfo	/* smapyqry.c */
+    SmInvalid	/* smapyqry.c */
 };
 
 /* TODO: optimize this address computation (it should be done

Modified: trunk/reactos/base/system/smss/smapiexec.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss/smapiexec.c?rev=55455&r1=55454&r2=55455&view=diff
==============================================================================
--- trunk/reactos/base/system/smss/smapiexec.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/smss/smapiexec.c [iso-8859-1] Mon Feb  6 09:29:33 2012
@@ -263,23 +263,9 @@
 			else
 			{
 				/*
-				 * OK, the definition is empty, but check
-				 * if it is the name of an embedded subsystem.
+				 * Badly defined subsystem. Check the registry!
 				 */
-				if(0 == _wcsicmp(L"DEBUG", Name))
-				{
-					/*
-					 * Initialize the embedded DBGSS.
-					 */
-					Request->SmHeader.Status = SmInitializeDbgSs();
-				}
-				else
-				{
-					/*
-					 * Badly defined subsystem. Check the registry!
-					 */
-					Request->SmHeader.Status = STATUS_NOT_FOUND;
-				}
+				Request->SmHeader.Status = STATUS_NOT_FOUND;
 			}
 		} else {
 			/* It couldn't lookup the Name! */

Modified: trunk/reactos/base/system/smss/smapiquery.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss/smapiquery.c?rev=55455&r1=55454&r2=55455&view=diff
==============================================================================
--- trunk/reactos/base/system/smss/smapiquery.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/smss/smapiquery.c [iso-8859-1] Mon Feb  6 09:29:33 2012
@@ -12,7 +12,7 @@
 #define NDEBUG
 #include <debug.h>
 
-
+#if 0
 /**********************************************************************
  * SmQryInfo/1							API
  */
@@ -50,6 +50,6 @@
 	}
 	return Status;
 }
-
+#endif
 
 /* EOF */

Modified: trunk/reactos/base/system/smss2/smss.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss2/smss.c?rev=55455&r1=55454&r2=55455&view=diff
==============================================================================
--- trunk/reactos/base/system/smss2/smss.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/smss2/smss.c [iso-8859-1] Mon Feb  6 09:29:33 2012
@@ -305,7 +305,7 @@
     SIZE_T Size;
     PWSTR p;
     UNICODE_STRING NullString = RTL_CONSTANT_STRING(L"");
-    UNICODE_STRING SmssName, Environment, SystemDriveString, DebugString;
+    UNICODE_STRING SmssName, DebugString;
     PVOID EnvironmentPtr = NULL;
     PRTL_USER_PROCESS_INFORMATION ProcessInformation;
     PRTL_USER_PROCESS_PARAMETERS ProcessParams = NULL;
@@ -436,28 +436,7 @@
                              NtInitialUserProcessBuffer);
 
     /* Create the environment string */
-    RtlInitEmptyUnicodeString(&Environment,
-                              ProcessParams->Environment,
-                              (USHORT)Size);
-
-    /* Append the DLL path to it */
-    RtlAppendUnicodeToString(&Environment, L"Path=");
-    RtlAppendUnicodeStringToString(&Environment, &ProcessParams->DllPath);
-    RtlAppendUnicodeStringToString(&Environment, &NullString);
-
-    /* Create the system drive string */
-    SystemDriveString = SmpSystemRoot;
-    SystemDriveString.Length = 2 * sizeof(WCHAR);
-
-    /* Append it to the environment */
-    RtlAppendUnicodeToString(&Environment, L"SystemDrive=");
-    RtlAppendUnicodeStringToString(&Environment, &SystemDriveString);
-    RtlAppendUnicodeStringToString(&Environment, &NullString);
-
-    /* Append the system root to the environment */
-    RtlAppendUnicodeToString(&Environment, L"SystemRoot=");
-    RtlAppendUnicodeStringToString(&Environment, &SmpSystemRoot);
-    RtlAppendUnicodeStringToString(&Environment, &NullString);
+    ProcessParams->Environment = SmpDefaultEnvironment;
 
     /* Create SMSS process */
     SmssName = ProcessParams->ImagePathName;




More information about the Ros-diffs mailing list