:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[reactos.git] / subsys / system / lsass / lsass.c
1 /* $Id$
2  *
3  * reactos/services/lsass/lsass.c
4  * 
5  * ReactOS Operating System
6  * 
7  * --------------------------------------------------------------------
8  *
9  * This software is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License as
11  * published by the Free Software Foundation; either version 2 of the
12  * License, or (at your option) any later version.
13  *
14  * This software is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this software; see the file COPYING.LIB. If not, write
21  * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
22  * MA 02139, USA.  
23  *
24  * --------------------------------------------------------------------
25  * 
26  *      19990704 (Emanuele Aliberti)
27  *              Compiled successfully with egcs 1.1.2
28  */
29 #include <ddk/ntddk.h>
30 #include <wchar.h>
31
32 BOOL InitLsa(VOID); /* ./init.c */
33
34
35 void
36 DisplayString( LPCWSTR lpwString )
37 {
38         UNICODE_STRING us;
39
40         us.Buffer = (LPWSTR) lpwString;
41         us.Length = wcslen(lpwString) * sizeof (WCHAR);
42         us.MaximumLength = us.Length + sizeof (WCHAR);
43         NtDisplayString( & us );
44 }
45
46
47 /* Native image's entry point */
48
49 void
50 NtProcessStartup( PSTARTUP_ARGUMENT StartupArgument )
51 {
52         DisplayString( L"Local Security Authority Subsystem:\n" );
53         DisplayString( L"\tInitializing...\n" );
54
55         if (TRUE == InitLsa())
56         {
57                 DisplayString( L"\tInitialization OK\n" );
58                 /* FIXME: do nothing loop */
59                 while (TRUE)
60                 {
61                         NtYieldExecution();
62                 }
63         }
64         else
65         {
66                 DisplayString( L"\tInitialization failed!\n" );
67         }
68         NtTerminateProcess( NtCurrentProcess(), 0 );
69 }
70
71
72 /* EOF */