- Make lsass.exe a win32 application.

- Load and initialize lsasrv.dll.

svn path=/trunk/; revision=13617
This commit is contained in:
Eric Kohl 2005-02-17 12:45:13 +00:00
parent 598769de43
commit 1f5552d521
4 changed files with 35 additions and 150 deletions

View file

@ -1,43 +0,0 @@
/* $Id$
*
* init.c - Local Security Manager Initialization
*
* ReactOS Operating System
*
* --------------------------------------------------------------------
*
* This software is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING.LIB. If not, write
* to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
* MA 02139, USA.
*
* --------------------------------------------------------------------
*
* 19990704 (Emanuele Aliberti)
* Compiled successfully with egcs 1.1.2
*/
#include <ddk/ntddk.h>
BOOL
InitLsa(
HANDLE Children[]
)
{
/* FIXME: create the \SeLsaCommandPort LPC port */
/* FIXME: create the \LsaAuthenticationPort LPC port */
return TRUE;
}
/* EOF */

View file

@ -1,68 +0,0 @@
; $Id$
LIBRARY lsasrv
EXPORTS
LsaIAuditNotifyPackageLoad
LsaIAuditSamEvent
LsaIEnumerateSecrets
LsaIFree_LSAI_PRIVATE_DATA
LsaIFree_LSAI_SECRET_ENUM_BUFFER
LsaIFree_LSAPR_ACCOUNT_ENUM_BUFFER
LsaIFree_LSAPR_CR_CIPHER_VALUE
LsaIFree_LSAPR_POLICY_INFORMATION
LsaIFree_LSAPR_PRIVILEGE_ENUM_BUFFER
LsaIFree_LSAPR_PRIVILEGE_SET
LsaIFree_LSAPR_REFERENCED_DOMAIN_LIST
LsaIFree_LSAPR_SR_SECURITY_DESCRIPTOR
LsaIFree_LSAPR_TRANSLATED_NAMES
LsaIFree_LSAPR_TRANSLATED_SIDS
LsaIFree_LSAPR_TRUSTED_DOMAIN_INFO
LsaIFree_LSAPR_TRUSTED_ENUM_BUFFER
LsaIFree_LSAPR_TRUST_INFORMATION
LsaIFree_LSAPR_UNICODE_STRING
LsaIGetPrivateData
LsaIGetSerialNumberPolicy
LsaIGetSerialNumberPolicy2
LsaIHealthCheck
LsaIInitializeWellKnownSids
LsaIOpenPolicyTrusted
LsaIQueryInformationPolicyTrusted
LsaISetPrivateData
LsaISetSerialNumberPolicy
LsaISetTimesSecret
LsaISetupWasRun
LsapAuOpenSam
LsapInitLsa
LsarAddPrivilegesToAccount
LsarClose
LsarCreateAccount
LsarCreateSecret
LsarCreateTrustedDomain
LsarDelete
LsarEnumerateAccounts
LsarEnumeratePrivileges
LsarEnumeratePrivilegesAccount
LsarEnumerateTrustedDomains
LsarGetQuotasForAccount
LsarGetSystemAccessAccount
LsarLookupNames
LsarLookupPrivilegeDisplayName
LsarLookupPrivilegeName
LsarLookupPrivilegeValue
LsarLookupSids
LsarOpenAccount
LsarOpenPolicy
LsarOpenSecret
LsarOpenTrustedDomain
LsarQueryInfoTrustedDomain
LsarQueryInformationPolicy
LsarQuerySecret
LsarQuerySecurityObject
LsarRemovePrivilegesFromAccount
LsarSetInformationPolicy
LsarSetInformationTrustedDomain
LsarSetQuotasForAccount
LsarSetSecret
LsarSetSecurityObject
LsarSetSystemAccessAccount
ServiceInit

View file

@ -1,6 +1,6 @@
/* $Id$
*
* reactos/services/lsass/lsass.c
* reactos/subsys/system/lsass/lsass.c
*
* ReactOS Operating System
*
@ -26,47 +26,39 @@
* 19990704 (Emanuele Aliberti)
* Compiled successfully with egcs 1.1.2
*/
#include <ddk/ntddk.h>
#include <wchar.h>
//#include <ddk/ntddk.h>
//#include <windows.h>
#include <ddk/ntapi.h>
#include <lsass/lsasrv.h>
BOOL InitLsa(VOID); /* ./init.c */
#define NDEBUG
#include <debug.h>
void
DisplayString( LPCWSTR lpwString )
int STDCALL
WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nShowCmd)
{
UNICODE_STRING us;
NTSTATUS Status = STATUS_SUCCESS;
us.Buffer = (LPWSTR) lpwString;
us.Length = wcslen(lpwString) * sizeof (WCHAR);
us.MaximumLength = us.Length + sizeof (WCHAR);
NtDisplayString( & us );
DPRINT("Local Security Authority Subsystem\n");
DPRINT(" Initializing...\n");
Status = LsapInitLsa();
if (!NT_SUCCESS(Status))
{
DPRINT1("LsapInitLsa() failed (Status 0x%08lX)\n", Status);
goto ByeBye;
}
/* FIXME: More initialization */
ByeBye:
NtTerminateThread(NtCurrentThread(), Status);
return 0;
}
/* Native image's entry point */
VOID STDCALL
NtProcessStartup(PPEB Peb)
{
DisplayString( L"Local Security Authority Subsystem:\n" );
DisplayString( L"\tInitializing...\n" );
if (TRUE == InitLsa())
{
DisplayString( L"\tInitialization OK\n" );
/* FIXME: do nothing loop */
while (TRUE)
{
NtYieldExecution();
}
}
else
{
DisplayString( L"\tInitialization failed!\n" );
}
NtTerminateProcess( NtCurrentProcess(), 0 );
}
/* EOF */

View file

@ -4,13 +4,17 @@ PATH_TO_TOP = ../../..
TARGET_TYPE = program
TARGET_APPTYPE = native
TARGET_APPTYPE = windows
TARGET_NAME = lsass
TARGET_INSTALLDIR = system32
TARGET_OBJECTS = $(TARGET_NAME).o init.o
TARGET_CFLAGS += -Wall -Werror -D__USE_W32API
TARGET_OBJECTS = lsass.o
TARGET_SDKLIBS = ntdll.a kernel32.a lsasrv.a
include $(PATH_TO_TOP)/rules.mak