[LSASRV][SYSSETUP]
[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 /* authport.c */
57 NTSTATUS
58 StartAuthenticationPort(VOID);
59
60 /* database.c */
61 NTSTATUS
62 LsapInitDatabase(VOID);
63
64 NTSTATUS
65 LsapCreateDbObject(IN PLSA_DB_OBJECT ParentObject,
66 IN LPWSTR ObjectName,
67 IN LSA_DB_OBJECT_TYPE HandleType,
68 IN ACCESS_MASK DesiredAccess,
69 OUT PLSA_DB_OBJECT *DbObject);
70
71 NTSTATUS
72 LsapOpenDbObject(IN PLSA_DB_OBJECT ParentObject,
73 IN LPWSTR ObjectName,
74 IN LSA_DB_OBJECT_TYPE ObjectType,
75 IN ACCESS_MASK DesiredAccess,
76 OUT PLSA_DB_OBJECT *DbObject);
77
78 NTSTATUS
79 LsapValidateDbObject(IN LSAPR_HANDLE Handle,
80 IN LSA_DB_OBJECT_TYPE HandleType,
81 IN ACCESS_MASK GrantedAccess,
82 OUT PLSA_DB_OBJECT *DbObject);
83
84 NTSTATUS
85 LsapCloseDbObject(IN PLSA_DB_OBJECT DbObject);
86
87 NTSTATUS
88 LsapGetObjectAttribute(PLSA_DB_OBJECT DbObject,
89 LPWSTR AttributeName,
90 LPVOID AttributeData,
91 PULONG AttributeSize);
92
93 NTSTATUS
94 LsapSetObjectAttribute(PLSA_DB_OBJECT DbObject,
95 LPWSTR AttributeName,
96 LPVOID AttributeData,
97 ULONG AttributeSize);
98
99 /* lsarpc.c */
100 VOID
101 LsarStartRpcServer(VOID);
102
103 /* policy.c */
104 NTSTATUS
105 LsarQueryAuditEvents(PLSA_DB_OBJECT PolicyObject,
106 PLSAPR_POLICY_INFORMATION *PolicyInformation);
107
108 NTSTATUS
109 LsarQueryPrimaryDomain(PLSA_DB_OBJECT PolicyObject,
110 PLSAPR_POLICY_INFORMATION *PolicyInformation);
111
112 NTSTATUS
113 LsarQueryAccountDomain(PLSA_DB_OBJECT PolicyObject,
114 PLSAPR_POLICY_INFORMATION *PolicyInformation);
115
116 NTSTATUS
117 LsarQueryDnsDomain(PLSA_DB_OBJECT PolicyObject,
118 PLSAPR_POLICY_INFORMATION *PolicyInformation);
119
120 NTSTATUS
121 LsarSetPrimaryDomain(PLSA_DB_OBJECT PolicyObject,
122 PLSAPR_POLICY_PRIMARY_DOM_INFO Info);
123
124 NTSTATUS
125 LsarSetAccountDomain(PLSA_DB_OBJECT PolicyObject,
126 PLSAPR_POLICY_ACCOUNT_DOM_INFO Info);
127
128 NTSTATUS
129 LsarSetDnsDomain(PLSA_DB_OBJECT PolicyObject,
130 PLSAPR_POLICY_DNS_DOMAIN_INFO Info);
131
132 /* privileges.c */
133 NTSTATUS
134 LsarpLookupPrivilegeName(PLUID Value,
135 PUNICODE_STRING *Name);
136
137 NTSTATUS
138 LsarpLookupPrivilegeValue(PUNICODE_STRING Name,
139 PLUID Value);
140
141 /* sids.h */
142 NTSTATUS
143 LsapInitSids(VOID);
144
145 NTSTATUS
146 LsapLookupSids(PLSAPR_SID_ENUM_BUFFER SidEnumBuffer,
147 PLSAPR_TRANSLATED_NAME OutputNames);
148