[LSASRV]
[reactos.git] / reactos / dll / win32 / lsasrv / lsasrv.h
index 194aef1..a19e93d 100644 (file)
@@ -7,6 +7,9 @@
  * 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,
@@ -65,12 +64,12 @@ typedef struct _LSA_DB_OBJECT
 
 #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
@@ -91,6 +90,15 @@ extern UNICODE_STRING BuiltinDomainName;
 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);
@@ -161,6 +169,10 @@ NTSTATUS
 LsapDeleteObjectAttribute(PLSA_DB_OBJECT DbObject,
                           LPWSTR AttributeName);
 
+/* dssetup.c */
+VOID
+DsSetupInit(VOID);
+
 /* lookup.c */
 NTSTATUS
 LsapInitSids(VOID);
@@ -298,8 +310,15 @@ LsarpLookupPrivilegeName(PLUID Value,
                          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,
@@ -310,6 +329,10 @@ NTSTATUS
 LsapLookupAccountRightName(ULONG RightValue,
                            PRPC_UNICODE_STRING *Name);
 
+ACCESS_MASK
+LsapLookupAccountRightValue(
+    IN PRPC_UNICODE_STRING Name);
+
 /* registry.h */
 NTSTATUS
 LsapRegCloseKey(IN HANDLE KeyHandle);
@@ -342,6 +365,7 @@ LsapRegOpenKey(IN HANDLE ParentKeyHandle,
 NTSTATUS
 LsapRegQueryKeyInfo(IN HANDLE KeyHandle,
                     OUT PULONG SubKeyCount,
+                    OUT PULONG MaxSubKeyNameLength,
                     OUT PULONG ValueCount);
 
 NTSTATUS
@@ -396,6 +420,53 @@ 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,
@@ -403,4 +474,9 @@ LsapLoadString(HINSTANCE hInstance,
                LPWSTR lpBuffer,
                INT nBufferMax);
 
-/* EOF */
+PSID
+LsapAppendRidToSid(
+    PSID SrcSid,
+    ULONG Rid);
+
+#endif /* _LSASRV_H */