* PROGRAMMERS: Eric Kohl
*/
+#ifndef _LSASRV_H
+#define _LSASRV_H
+
#include <stdarg.h>
#define WIN32_NO_STATUS
#include <windef.h>
#include <winbase.h>
#include <winreg.h>
-#include <winuser.h>
#define NTOS_MODE_USER
#include <ndk/cmfuncs.h>
+#include <ndk/exfuncs.h>
#include <ndk/kefuncs.h>
-#include <ndk/lpctypes.h>
-#include <ndk/lpcfuncs.h>
#include <ndk/mmfuncs.h>
#include <ndk/obfuncs.h>
#include <ndk/psfuncs.h>
#include <ndk/rtlfuncs.h>
#include <ndk/setypes.h>
-#include <ndk/sefuncs.h>
-#include <ndk/umfuncs.h>
#include <ntsam.h>
#include <ntlsa.h>
#include <sddl.h>
+#include <srmp.h>
+
#include <lsass.h>
#include <lsa_s.h>
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(lsasrv);
-#include "resources.h"
-
typedef enum _LSA_DB_OBJECT_TYPE
{
LsaDbIgnoreObject,
#define LSAP_DB_SIGNATURE 0x12345678
-
+#define POLICY_AUDIT_EVENT_TYPE_COUNT (AuditCategoryAccountLogon - AuditCategorySystem + 1)
typedef struct _LSAP_POLICY_AUDIT_EVENTS_DATA
{
BOOLEAN AuditingMode;
+ DWORD AuditEvents[POLICY_AUDIT_EVENT_TYPE_COUNT];
DWORD MaximumAuditEventCount;
- DWORD AuditEvents[0];
} LSAP_POLICY_AUDIT_EVENTS_DATA, *PLSAP_POLICY_AUDIT_EVENTS_DATA;
typedef struct _LSAP_LOGON_CONTEXT
extern PSID AccountDomainSid;
extern UNICODE_STRING AccountDomainName;
+extern PSID LsapWorldSid;
+extern PSID LsapNetworkSid;
+extern PSID LsapBatchSid;
+extern PSID LsapInteractiveSid;
+extern PSID LsapServiceSid;
+extern PSID LsapLocalSystemSid;
+extern PSID LsapAdministratorsSid;
+
+
/* authpackage.c */
NTSTATUS
LsapInitAuthPackages(VOID);
LsapDeleteObjectAttribute(PLSA_DB_OBJECT DbObject,
LPWSTR AttributeName);
+/* dssetup.c */
+VOID
+DsSetupInit(VOID);
+
/* lookup.c */
NTSTATUS
LsapInitSids(VOID);
PRPC_UNICODE_STRING *Name);
NTSTATUS
-LsarpLookupPrivilegeValue(PRPC_UNICODE_STRING Name,
- PLUID Value);
+LsarpLookupPrivilegeDisplayName(PRPC_UNICODE_STRING Name,
+ USHORT ClientLanguage,
+ USHORT ClientSystemDefaultLanguage,
+ PRPC_UNICODE_STRING *DisplayName,
+ USHORT *LanguageReturned);
+
+PLUID
+LsarpLookupPrivilegeValue(
+ IN PRPC_UNICODE_STRING Name);
NTSTATUS
LsarpEnumeratePrivileges(DWORD *EnumerationContext,
LsapLookupAccountRightName(ULONG RightValue,
PRPC_UNICODE_STRING *Name);
+ACCESS_MASK
+LsapLookupAccountRightValue(
+ IN PRPC_UNICODE_STRING Name);
+
/* registry.h */
NTSTATUS
LsapRegCloseKey(IN HANDLE KeyHandle);
NTSTATUS
LsapRegQueryKeyInfo(IN HANDLE KeyHandle,
OUT PULONG SubKeyCount,
+ OUT PULONG MaxSubKeyNameLength,
OUT PULONG ValueCount);
NTSTATUS
NTAPI
LsapDeleteLogonSession(IN PLUID LogonId);
+NTSTATUS
+NTAPI
+LsapAddCredential(
+ _In_ PLUID LogonId,
+ _In_ ULONG AuthenticationPackage,
+ _In_ PLSA_STRING PrimaryKeyValue,
+ _In_ PLSA_STRING Credential);
+
+NTSTATUS
+NTAPI
+LsapGetCredentials(
+ _In_ PLUID LogonId,
+ _In_ ULONG AuthenticationPackage,
+ _Inout_ PULONG QueryContext,
+ _In_ BOOLEAN RetrieveAllCredentials,
+ _Inout_ PLSA_STRING PrimaryKeyValue,
+ _Out_ PULONG PrimaryKeyLength,
+ _Out_ PLSA_STRING Credentials);
+
+NTSTATUS
+NTAPI
+LsapDeleteCredential(
+ _In_ PLUID LogonId,
+ _In_ ULONG AuthenticationPackage,
+ _In_ PLSA_STRING PrimaryKeyValue);
+
NTSTATUS
LsapSetLogonSessionData(IN PLUID LogonId);
+NTSTATUS
+LsapEnumLogonSessions(IN OUT PLSA_API_MSG RequestMsg);
+
+NTSTATUS
+LsapGetLogonSessionData(IN OUT PLSA_API_MSG RequestMsg);
+
+/* srm.c */
+NTSTATUS
+LsapRmInitializeServer(VOID);
+
+NTSTATUS
+LsapRmCreateLogonSession(
+ PLUID LogonId);
+
+NTSTATUS
+LsapRmDeleteLogonSession(
+ PLUID LogonId);
+
/* utils.c */
INT
LsapLoadString(HINSTANCE hInstance,
LPWSTR lpBuffer,
INT nBufferMax);
-/* EOF */
+PSID
+LsapAppendRidToSid(
+ PSID SrcSid,
+ ULONG Rid);
+
+#endif /* _LSASRV_H */