Reactos

[LSASS] Initialize SAM before starting the security services

We need to initialize SAM before the security services get started, otherwise we will have a running SamSs service although SAM is not initialized at that time. This is no good.

+7 -7
+7 -7
base/system/lsass/lsass.c
··· 50 50 /* Make us critical */ 51 51 RtlSetProcessIsCritical(TRUE, NULL, TRUE); 52 52 53 - /* Initialize the LSA server DLL. */ 53 + /* Initialize the LSA server DLL */ 54 54 Status = LsapInitLsa(); 55 55 if (!NT_SUCCESS(Status)) 56 56 { ··· 58 58 goto ByeBye; 59 59 } 60 60 61 - /* Start the Netlogon service. */ 62 - Status = ServiceInit(); 61 + /* Initialize the SAM server DLL */ 62 + Status = SamIInitialize(); 63 63 if (!NT_SUCCESS(Status)) 64 64 { 65 - DPRINT1("ServiceInit() failed (Status 0x%08lX)\n", Status); 65 + DPRINT1("SamIInitialize() failed (Status 0x%08lX)\n", Status); 66 66 goto ByeBye; 67 67 } 68 68 69 - /* Initialize the SAM server DLL. */ 70 - Status = SamIInitialize(); 69 + /* Start the security services */ 70 + Status = ServiceInit(); 71 71 if (!NT_SUCCESS(Status)) 72 72 { 73 - DPRINT1("SamIInitialize() failed (Status 0x%08lX)\n", Status); 73 + DPRINT1("ServiceInit() failed (Status 0x%08lX)\n", Status); 74 74 goto ByeBye; 75 75 } 76 76