* Sync up to trunk head (r65095).
[reactos.git] / base / system / lsass / lsass.c
1 /*
2 * reactos/subsys/system/lsass/lsass.c
3 *
4 * ReactOS Operating System
5 *
6 * --------------------------------------------------------------------
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 *
22 * --------------------------------------------------------------------
23 *
24 * 19990704 (Emanuele Aliberti)
25 * Compiled successfully with egcs 1.1.2
26 */
27 #define WIN32_NO_STATUS
28 #define NTOS_MODE_USER
29
30 #include <ndk/psfuncs.h>
31
32 #include <lsass/lsasrv.h>
33 #include <samsrv/samsrv.h>
34
35 #define NDEBUG
36 #include <debug.h>
37
38 INT WINAPI
39 wWinMain(IN HINSTANCE hInstance,
40 IN HINSTANCE hPrevInstance,
41 IN LPWSTR lpCmdLine,
42 IN INT nShowCmd)
43 {
44 NTSTATUS Status = STATUS_SUCCESS;
45
46 DPRINT("Local Security Authority Subsystem\n");
47 DPRINT(" Initializing...\n");
48
49 /* Initialize the LSA server DLL. */
50 Status = LsapInitLsa();
51 if (!NT_SUCCESS(Status))
52 {
53 DPRINT1("LsapInitLsa() failed (Status 0x%08lX)\n", Status);
54 goto ByeBye;
55 }
56
57 /* Start the Netlogon service. */
58 Status = ServiceInit();
59 if (!NT_SUCCESS(Status))
60 {
61 DPRINT1("ServiceInit() failed (Status 0x%08lX)\n", Status);
62 goto ByeBye;
63 }
64
65 /* Initialize the SAM server DLL. */
66 Status = SamIInitialize();
67 if (!NT_SUCCESS(Status))
68 {
69 DPRINT1("SamIInitialize() failed (Status 0x%08lX)\n", Status);
70 goto ByeBye;
71 }
72
73 /* FIXME: More initialization */
74
75 DPRINT(" Done...\n");
76
77 ByeBye:
78 NtTerminateThread(NtCurrentThread(), Status);
79
80 return 0;
81 }
82
83 /* EOF */