79f7ed499371526b5a7b8231eb2d16b862ee2ded
[reactos.git] / reactos / dll / win32 / lsasrv / lsasrv.h
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: Local Security Authority (LSA) Server
4 * FILE: reactos/dll/win32/lsasrv/lsasrv.h
5 * PURPOSE: Common header file
6 *
7 * PROGRAMMERS: Eric Kohl
8 */
9
10 #define WIN32_NO_STATUS
11 #include <windows.h>
12 #define NTOS_MODE_USER
13 #include <ndk/cmfuncs.h>
14 #include <ndk/lpctypes.h>
15 #include <ndk/lpcfuncs.h>
16 #include <ndk/obfuncs.h>
17 #include <ndk/rtlfuncs.h>
18 #include <ndk/setypes.h>
19
20 #include <ntlsa.h>
21 #include <ntsecapi.h>
22 #include <sddl.h>
23
24 #include <string.h>
25
26 #include "lsass.h"
27 #include "lsa_s.h"
28
29 #include <wine/debug.h>
30
31
32 typedef enum _LSA_DB_OBJECT_TYPE
33 {
34 LsaDbIgnoreObject,
35 LsaDbContainerObject,
36 LsaDbPolicyObject,
37 LsaDbAccountObject,
38 LsaDbDomainObject,
39 LsaDbSecretObject
40 } LSA_DB_OBJECT_TYPE, *PLSA_DB_OBJECT_TYPE;
41
42 typedef struct _LSA_DB_OBJECT
43 {
44 ULONG Signature;
45 LSA_DB_OBJECT_TYPE ObjectType;
46 ULONG RefCount;
47 ACCESS_MASK Access;
48 HANDLE KeyHandle;
49 struct _LSA_DB_OBJECT *ParentObject;
50 } LSA_DB_OBJECT, *PLSA_DB_OBJECT;
51
52 #define LSAP_DB_SIGNATURE 0x12345678
53
54
55 /* authport.c */
56 NTSTATUS
57 StartAuthenticationPort(VOID);
58
59 /* database.c */
60 NTSTATUS
61 LsapInitDatabase(VOID);
62
63 NTSTATUS
64 LsapCreateDbObject(IN PLSA_DB_OBJECT ParentObject,
65 IN LPWSTR ObjectName,
66 IN LSA_DB_OBJECT_TYPE HandleType,
67 IN ACCESS_MASK DesiredAccess,
68 OUT PLSA_DB_OBJECT *DbObject);
69
70 NTSTATUS
71 LsapOpenDbObject(IN PLSA_DB_OBJECT ParentObject,
72 IN LPWSTR ObjectName,
73 IN LSA_DB_OBJECT_TYPE ObjectType,
74 IN ACCESS_MASK DesiredAccess,
75 OUT PLSA_DB_OBJECT *DbObject);
76
77 NTSTATUS
78 LsapValidateDbObject(IN LSAPR_HANDLE Handle,
79 IN LSA_DB_OBJECT_TYPE HandleType,
80 IN ACCESS_MASK GrantedAccess,
81 OUT PLSA_DB_OBJECT *DbObject);
82
83 NTSTATUS
84 LsapCloseDbObject(IN PLSA_DB_OBJECT DbObject);
85
86 NTSTATUS
87 LsapGetObjectAttribute(PLSA_DB_OBJECT DbObject,
88 LPWSTR AttributeName,
89 LPVOID AttributeData,
90 PULONG AttributeSize);
91
92 NTSTATUS
93 LsapSetObjectAttribute(PLSA_DB_OBJECT DbObject,
94 LPWSTR AttributeName,
95 LPVOID AttributeData,
96 ULONG AttributeSize);
97
98 /* lsarpc.c */
99 VOID
100 LsarStartRpcServer(VOID);
101
102 /* policy.c */
103 NTSTATUS
104 LsarQueryAuditEvents(PLSA_DB_OBJECT PolicyObject,
105 PLSAPR_POLICY_INFORMATION *PolicyInformation);
106
107 NTSTATUS
108 LsarQueryPrimaryDomain(PLSA_DB_OBJECT PolicyObject,
109 PLSAPR_POLICY_INFORMATION *PolicyInformation);
110
111 NTSTATUS
112 LsarQueryAccountDomain(PLSA_DB_OBJECT PolicyObject,
113 PLSAPR_POLICY_INFORMATION *PolicyInformation);
114
115 NTSTATUS
116 LsarQueryDnsDomain(PLSA_DB_OBJECT PolicyObject,
117 PLSAPR_POLICY_INFORMATION *PolicyInformation);
118
119 NTSTATUS
120 LsarSetPrimaryDomain(PLSA_DB_OBJECT PolicyObject,
121 PLSAPR_POLICY_PRIMARY_DOM_INFO Info);
122
123 NTSTATUS
124 LsarSetAccountDomain(PLSA_DB_OBJECT PolicyObject,
125 PLSAPR_POLICY_ACCOUNT_DOM_INFO Info);
126
127 NTSTATUS
128 LsarSetDnsDomain(PLSA_DB_OBJECT PolicyObject,
129 PLSAPR_POLICY_DNS_DOMAIN_INFO Info);
130
131 /* privileges.c */
132 NTSTATUS
133 LsarpLookupPrivilegeName(PLUID Value,
134 PUNICODE_STRING *Name);
135
136 NTSTATUS
137 LsarpLookupPrivilegeValue(PUNICODE_STRING Name,
138 PLUID Value);
139
140 /* sids.h */
141 NTSTATUS
142 LsapInitSids(VOID);
143
144 NTSTATUS
145 LsapLookupSids(PLSAPR_SID_ENUM_BUFFER SidEnumBuffer,
146 PLSAPR_TRANSLATED_NAME OutputNames);
147