[LSASRV]
[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/kefuncs.h>
15 #include <ndk/lpctypes.h>
16 #include <ndk/lpcfuncs.h>
17 #include <ndk/obfuncs.h>
18 #include <ndk/rtlfuncs.h>
19 #include <ndk/setypes.h>
20
21 #include <ntlsa.h>
22 #include <ntsecapi.h>
23 #include <sddl.h>
24
25 #include <string.h>
26
27 #include "lsass.h"
28 #include "lsa_s.h"
29
30 #include <wine/debug.h>
31
32
33 typedef enum _LSA_DB_OBJECT_TYPE
34 {
35 LsaDbIgnoreObject,
36 LsaDbContainerObject,
37 LsaDbPolicyObject,
38 LsaDbAccountObject,
39 LsaDbDomainObject,
40 LsaDbSecretObject
41 } LSA_DB_OBJECT_TYPE, *PLSA_DB_OBJECT_TYPE;
42
43 typedef struct _LSA_DB_OBJECT
44 {
45 ULONG Signature;
46 LSA_DB_OBJECT_TYPE ObjectType;
47 ULONG RefCount;
48 ACCESS_MASK Access;
49 HANDLE KeyHandle;
50 struct _LSA_DB_OBJECT *ParentObject;
51 } LSA_DB_OBJECT, *PLSA_DB_OBJECT;
52
53 #define LSAP_DB_SIGNATURE 0x12345678
54
55
56 typedef struct _LSAP_POLICY_AUDIT_EVENTS_DATA
57 {
58 BOOLEAN AuditingMode;
59 DWORD MaximumAuditEventCount;
60 DWORD AuditEvents[0];
61 } LSAP_POLICY_AUDIT_EVENTS_DATA, *PLSAP_POLICY_AUDIT_EVENTS_DATA;
62
63
64 /* authport.c */
65 NTSTATUS
66 StartAuthenticationPort(VOID);
67
68 /* database.c */
69 NTSTATUS
70 LsapInitDatabase(VOID);
71
72 NTSTATUS
73 LsapCreateDbObject(IN PLSA_DB_OBJECT ParentObject,
74 IN LPWSTR ObjectName,
75 IN LSA_DB_OBJECT_TYPE HandleType,
76 IN ACCESS_MASK DesiredAccess,
77 OUT PLSA_DB_OBJECT *DbObject);
78
79 NTSTATUS
80 LsapOpenDbObject(IN PLSA_DB_OBJECT ParentObject,
81 IN LPWSTR ObjectName,
82 IN LSA_DB_OBJECT_TYPE ObjectType,
83 IN ACCESS_MASK DesiredAccess,
84 OUT PLSA_DB_OBJECT *DbObject);
85
86 NTSTATUS
87 LsapValidateDbObject(IN LSAPR_HANDLE Handle,
88 IN LSA_DB_OBJECT_TYPE HandleType,
89 IN ACCESS_MASK GrantedAccess,
90 OUT PLSA_DB_OBJECT *DbObject);
91
92 NTSTATUS
93 LsapCloseDbObject(IN PLSA_DB_OBJECT DbObject);
94
95 NTSTATUS
96 LsapGetObjectAttribute(PLSA_DB_OBJECT DbObject,
97 LPWSTR AttributeName,
98 LPVOID AttributeData,
99 PULONG AttributeSize);
100
101 NTSTATUS
102 LsapSetObjectAttribute(PLSA_DB_OBJECT DbObject,
103 LPWSTR AttributeName,
104 LPVOID AttributeData,
105 ULONG AttributeSize);
106
107 /* lsarpc.c */
108 VOID
109 LsarStartRpcServer(VOID);
110
111 /* policy.c */
112 NTSTATUS
113 LsarQueryAuditLog(PLSA_DB_OBJECT PolicyObject,
114 PLSAPR_POLICY_INFORMATION *PolicyInformation);
115
116 NTSTATUS
117 LsarQueryAuditEvents(PLSA_DB_OBJECT PolicyObject,
118 PLSAPR_POLICY_INFORMATION *PolicyInformation);
119
120 NTSTATUS
121 LsarQueryPrimaryDomain(PLSA_DB_OBJECT PolicyObject,
122 PLSAPR_POLICY_INFORMATION *PolicyInformation);
123
124 NTSTATUS
125 LsarQueryPdAccount(PLSA_DB_OBJECT PolicyObject,
126 PLSAPR_POLICY_INFORMATION *PolicyInformation);
127
128 NTSTATUS
129 LsarQueryAccountDomain(PLSA_DB_OBJECT PolicyObject,
130 PLSAPR_POLICY_INFORMATION *PolicyInformation);
131
132 NTSTATUS
133 LsarQueryServerRole(PLSA_DB_OBJECT PolicyObject,
134 PLSAPR_POLICY_INFORMATION *PolicyInformation);
135
136 NTSTATUS
137 LsarQueryReplicaSource(PLSA_DB_OBJECT PolicyObject,
138 PLSAPR_POLICY_INFORMATION *PolicyInformation);
139
140 NTSTATUS
141 LsarQueryDefaultQuota(PLSA_DB_OBJECT PolicyObject,
142 PLSAPR_POLICY_INFORMATION *PolicyInformation);
143
144 NTSTATUS
145 LsarQueryModification(PLSA_DB_OBJECT PolicyObject,
146 PLSAPR_POLICY_INFORMATION *PolicyInformation);
147
148 NTSTATUS
149 LsarQueryAuditFull(PLSA_DB_OBJECT PolicyObject,
150 PLSAPR_POLICY_INFORMATION *PolicyInformation);
151
152 NTSTATUS
153 LsarQueryDnsDomain(PLSA_DB_OBJECT PolicyObject,
154 PLSAPR_POLICY_INFORMATION *PolicyInformation);
155
156 NTSTATUS
157 LsarQueryDnsDomainInt(PLSA_DB_OBJECT PolicyObject,
158 PLSAPR_POLICY_INFORMATION *PolicyInformation);
159
160 NTSTATUS
161 LsarQueryLocalAccountDomain(PLSA_DB_OBJECT PolicyObject,
162 PLSAPR_POLICY_INFORMATION *PolicyInformation);
163
164 NTSTATUS
165 LsarSetPrimaryDomain(PLSA_DB_OBJECT PolicyObject,
166 PLSAPR_POLICY_PRIMARY_DOM_INFO Info);
167
168 NTSTATUS
169 LsarSetAccountDomain(PLSA_DB_OBJECT PolicyObject,
170 PLSAPR_POLICY_ACCOUNT_DOM_INFO Info);
171
172 NTSTATUS
173 LsarSetDnsDomain(PLSA_DB_OBJECT PolicyObject,
174 PLSAPR_POLICY_DNS_DOMAIN_INFO Info);
175
176 /* privileges.c */
177 NTSTATUS
178 LsarpLookupPrivilegeName(PLUID Value,
179 PUNICODE_STRING *Name);
180
181 NTSTATUS
182 LsarpLookupPrivilegeValue(PUNICODE_STRING Name,
183 PLUID Value);
184
185 /* sids.h */
186 NTSTATUS
187 LsapInitSids(VOID);
188
189 NTSTATUS
190 LsapLookupSids(PLSAPR_SID_ENUM_BUFFER SidEnumBuffer,
191 PLSAPR_TRANSLATED_NAME OutputNames);
192