rpcrt4: Pass in a maximum variance value to ReadVariance to allow us
[wine/multimedia.git] / include / ntsecapi.h
bloba73e603c6e0fb2992867a60aaa3f0bb0c24b5959
1 /*
2 * Copyright (C) 1999 Juergen Schmied
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_NTSECAPI_H
20 #define __WINE_NTSECAPI_H
22 #ifdef __cplusplus
23 extern "C" {
24 #endif /* defined(__cplusplus) */
26 /* Policy access rights */
27 #define POLICY_VIEW_LOCAL_INFORMATION 0x00000001L
28 #define POLICY_VIEW_AUDIT_INFORMATION 0x00000002L
29 #define POLICY_GET_PRIVATE_INFORMATION 0x00000004L
30 #define POLICY_TRUST_ADMIN 0x00000008L
31 #define POLICY_CREATE_ACCOUNT 0x00000010L
32 #define POLICY_CREATE_SECRET 0x00000020L
33 #define POLICY_CREATE_PRIVILEGE 0x00000040L
34 #define POLICY_SET_DEFAULT_QUOTA_LIMITS 0x00000080L
35 #define POLICY_SET_AUDIT_REQUIREMENTS 0x00000100L
36 #define POLICY_AUDIT_LOG_ADMIN 0x00000200L
37 #define POLICY_SERVER_ADMIN 0x00000400L
38 #define POLICY_LOOKUP_NAMES 0x00000800L
39 #define POLICY_NOTIFICATION 0x00001000L
41 #define POLICY_ALL_ACCESS ( \
42 STANDARD_RIGHTS_REQUIRED | \
43 POLICY_VIEW_LOCAL_INFORMATION | \
44 POLICY_VIEW_AUDIT_INFORMATION | \
45 POLICY_GET_PRIVATE_INFORMATION | \
46 POLICY_TRUST_ADMIN | \
47 POLICY_CREATE_ACCOUNT | \
48 POLICY_CREATE_SECRET | \
49 POLICY_CREATE_PRIVILEGE | \
50 POLICY_SET_DEFAULT_QUOTA_LIMITS | \
51 POLICY_SET_AUDIT_REQUIREMENTS | \
52 POLICY_AUDIT_LOG_ADMIN | \
53 POLICY_SERVER_ADMIN | \
54 POLICY_LOOKUP_NAMES)
57 #define POLICY_READ ( \
58 STANDARD_RIGHTS_READ | \
59 POLICY_VIEW_AUDIT_INFORMATION | \
60 POLICY_GET_PRIVATE_INFORMATION)
62 #define POLICY_WRITE ( \
63 STANDARD_RIGHTS_WRITE | \
64 POLICY_TRUST_ADMIN | \
65 POLICY_CREATE_ACCOUNT | \
66 POLICY_CREATE_SECRET | \
67 POLICY_CREATE_PRIVILEGE | \
68 POLICY_SET_DEFAULT_QUOTA_LIMITS | \
69 POLICY_SET_AUDIT_REQUIREMENTS | \
70 POLICY_AUDIT_LOG_ADMIN | \
71 POLICY_SERVER_ADMIN)
73 #define POLICY_EXECUTE ( \
74 STANDARD_RIGHTS_EXECUTE | \
75 POLICY_VIEW_LOCAL_INFORMATION | \
76 POLICY_LOOKUP_NAMES)
78 #define POLICY_AUDIT_EVENT_UNCHANGED 0x00000000L
79 #define POLICY_AUDIT_EVENT_SUCCESS 0x00000001L
80 #define POLICY_AUDIT_EVENT_FAILURE 0x00000002L
81 #define POLICY_AUDIT_EVENT_NONE 0x00000004L
83 #define POLICY_AUDIT_EVENT_MASK (POLICY_AUDIT_EVENT_SUCCESS | \
84 POLICY_AUDIT_EVENT_FAILURE | \
85 POLICY_AUDIT_EVENT_NONE)
87 /* logon rights names */
88 #define SE_BATCH_LOGON_NAME \
89 TEXT("SeBatchLogonRight")
90 #define SE_INTERACTIVE_LOGON_NAME \
91 TEXT("SeInteractiveLogonRight")
92 #define SE_NETWORK_LOGON_NAME \
93 TEXT("SeNetworkLogonRight")
94 #define SE_REMOTE_INTERACTIVE_LOGON_NAME \
95 TEXT("SeRemoteInteractiveLogonRight")
96 #define SE_SERVICE_LOGON_NAME \
97 TEXT("SeServiceLogonRight")
98 #define SE_DENY_BATCH_LOGON_NAME \
99 TEXT("SeDenyBatchLogonRight")
100 #define SE_DENY_INTERACTIVE_LOGON_NAME \
101 TEXT("SeDenyInteractiveLogonRight")
102 #define SE_DENY_NETWORK_LOGON_NAME \
103 TEXT("SeDenyNetworkLogonRight")
104 #define SE_DENY_REMOTE_INTERACTIVE_LOGON_NAME \
105 TEXT("SeDenyRemoteInteractiveLogonRight")
106 #define SE_DENY_SERVICE_LOGON_NAME \
107 TEXT("SeDenyServiceLogonRight")
109 #ifndef WINE_NTSTATUS_DECLARED
110 #define WINE_NTSTATUS_DECLARED
111 typedef LONG NTSTATUS;
112 #endif
113 #ifndef WINE_PNTSTATUS_DECLARED
114 #define WINE_PNTSTATUS_DECLARED
115 typedef NTSTATUS *PNTSTATUS;
116 #endif
118 typedef enum _SECURITY_LOGON_TYPE
120 Interactive = 2,
121 Network,
122 Batch,
123 Service,
124 Proxy
125 } SECURITY_LOGON_TYPE, *PSECURITY_LOGON_TYPE;
127 typedef enum _POLICY_AUDIT_EVENT_TYPE
129 AuditCategorySystem,
130 AuditCategoryLogon,
131 AuditCategoryObjectAccess,
132 AuditCategoryPrivilegeUse,
133 AuditCategoryDetailedTracking,
134 AuditCategoryPolicyChange,
135 AuditCategoryAccountManagement
136 } POLICY_AUDIT_EVENT_TYPE, *PPOLICY_AUDIT_EVENT_TYPE;
138 typedef UNICODE_STRING LSA_UNICODE_STRING, *PLSA_UNICODE_STRING;
139 typedef STRING LSA_STRING, *PLSA_STRING;
140 typedef OBJECT_ATTRIBUTES LSA_OBJECT_ATTRIBUTES, *PLSA_OBJECT_ATTRIBUTES;
142 typedef PVOID LSA_HANDLE, *PLSA_HANDLE;
143 typedef ULONG LSA_ENUMERATION_HANDLE, *PLSA_ENUMERATION_HANDLE;
145 typedef enum
147 PolicyAuditLogInformation = 1,
148 PolicyAuditEventsInformation,
149 PolicyPrimaryDomainInformation,
150 PolicyPdAccountInformation,
151 PolicyAccountDomainInformation,
152 PolicyLsaServerRoleInformation,
153 PolicyReplicaSourceInformation,
154 PolicyDefaultQuotaInformation,
155 PolicyModificationInformation,
156 PolicyAuditFullSetInformation,
157 PolicyAuditFullQueryInformation,
158 PolicyDnsDomainInformation
159 } POLICY_INFORMATION_CLASS, *PPOLICY_INFORMATION_CLASS;
161 typedef ULONG POLICY_AUDIT_EVENT_OPTIONS, *PPOLICY_AUDIT_EVENT_OPTIONS;
163 typedef struct _POLICY_AUDIT_EVENTS_INFO
165 BOOLEAN AuditingMode;
166 PPOLICY_AUDIT_EVENT_OPTIONS EventAuditingOptions;
167 ULONG MaximumAuditEventCount;
168 } POLICY_AUDIT_EVENTS_INFO, *PPOLICY_AUDIT_EVENTS_INFO;
170 typedef struct _POLICY_PRIMARY_DOMAIN_INFO
172 LSA_UNICODE_STRING Name;
173 PSID Sid;
174 } POLICY_PRIMARY_DOMAIN_INFO, *PPOLICY_PRIMARY_DOMAIN_INFO;
176 typedef struct _POLICY_ACCOUNT_DOMAIN_INFO
178 LSA_UNICODE_STRING DomainName;
179 PSID DomainSid;
180 } POLICY_ACCOUNT_DOMAIN_INFO, *PPOLICY_ACCOUNT_DOMAIN_INFO;
182 typedef struct
184 SID_NAME_USE Use;
185 LSA_UNICODE_STRING Name;
186 LONG DomainIndex;
187 } LSA_TRANSLATED_NAME, *PLSA_TRANSLATED_NAME;
189 typedef struct
191 LSA_UNICODE_STRING Name;
192 PSID Sid;
193 } LSA_TRUST_INFORMATION, *PLSA_TRUST_INFORMATION;
195 typedef struct
197 ULONG Entries;
198 PLSA_TRUST_INFORMATION Domains;
199 } LSA_REFERENCED_DOMAIN_LIST, *PLSA_REFERENCED_DOMAIN_LIST;
201 typedef struct _LSA_TRANSLATED_SID
203 SID_NAME_USE Use;
204 ULONG RelativeId;
205 LONG DomainIndex;
206 } LSA_TRANSLATED_SID, *PLSA_TRANSLATED_SID;
208 typedef struct _TRUSTED_DOMAIN_INFORMATION_EX
210 LSA_UNICODE_STRING Name;
211 LSA_UNICODE_STRING FlatName;
212 PSID Sid;
213 ULONG TrustDirection;
214 ULONG TrustType;
215 ULONG TrustAttributes;
216 } TRUSTED_DOMAIN_INFORMATION_EX, *PTRUSTED_DOMAIN_INFORMATION_EX;
218 typedef struct _LSA_AUTH_INFORMATION
220 LARGE_INTEGER LastUpdateTime;
221 ULONG AuthType;
222 ULONG AuthInfoLength;
223 PUCHAR AuthInfo;
224 } LSA_AUTH_INFORMATION, *PLSA_AUTH_INFORMATION;
226 typedef struct _TRUSTED_DOMAIN_AUTH_INFORMATION
228 ULONG IncomingAuthInfos;
229 PLSA_AUTH_INFORMATION IncomingAuthenticationInformation;
230 PLSA_AUTH_INFORMATION IncomingPreviousAuthenticationInformation;
231 ULONG OutgoingAuthInfos;
232 PLSA_AUTH_INFORMATION OutgoingAuthenticationInformation;
233 PLSA_AUTH_INFORMATION OutgoingPreviousAuthenticationInformation;
234 } TRUSTED_DOMAIN_AUTH_INFORMATION, *PTRUSTED_DOMAIN_AUTH_INFORMATION;
236 typedef struct _LSA_TRANSLATED_SID2
238 SID_NAME_USE Use;
239 PSID Sid;
240 LONG DomainIndex;
241 ULONG Flags;
242 } LSA_TRANSLATED_SID2, *PLSA_TRANSLATED_SID2;
244 typedef enum _TRUSTED_INFORMATION_CLASS
246 TrustedDomainNameInformation = 1,
247 TrustedControllersInformation,
248 TrustedPosixOffsetInformation,
249 TrustedPasswordInformation,
250 TrustedDomainInformationBasic,
251 TrustedDomainInformationEx,
252 TrustedDomainAuthInformation,
253 TrustedDomainFullInformation
254 } TRUSTED_INFORMATION_CLASS, *PTRUSTED_INFORMATION_CLASS;
256 typedef enum _POLICY_NOTIFICATION_INFORMATION_CLASS
258 PolicyNotifyAuditEventsInformation = 1,
259 PolicyNotifyAccountDomainInformation,
260 PolicyNotifyServerRoleInformation,
261 PolicyNotifyDnsDomainInformation,
262 PolicyNotifyDomainEfsInformation,
263 PolicyNotifyDomainKerberosTicketInformation,
264 PolicyNotifyMachineAccountPasswordInformation
265 } POLICY_NOTIFICATION_INFORMATION_CLASS, *PPOLICY_NOTIFICATION_INFORMATION_CLASS;
267 NTSTATUS WINAPI LsaAddAccountRights(LSA_HANDLE,PSID,PLSA_UNICODE_STRING,ULONG);
268 NTSTATUS WINAPI LsaCallAuthenticationPackage(HANDLE,ULONG,PVOID,ULONG,PVOID*,PULONG,PNTSTATUS);
269 NTSTATUS WINAPI LsaClose(LSA_HANDLE);
270 NTSTATUS WINAPI LsaConnectUntrusted(PHANDLE);
271 NTSTATUS WINAPI LsaCreateTrustedDomainEx(LSA_HANDLE,PTRUSTED_DOMAIN_INFORMATION_EX,
272 PTRUSTED_DOMAIN_AUTH_INFORMATION,ACCESS_MASK,PLSA_HANDLE);
273 NTSTATUS WINAPI LsaDeleteTrustedDomain(LSA_HANDLE,PSID);
274 NTSTATUS WINAPI LsaDeregisterLogonProcess(HANDLE);
275 NTSTATUS WINAPI LsaEnumerateAccountRights(LSA_HANDLE,PSID,PLSA_UNICODE_STRING*,PULONG);
276 NTSTATUS WINAPI LsaEnumerateAccountsWithUserRight(LSA_HANDLE,PLSA_UNICODE_STRING,PVOID*,PULONG);
277 NTSTATUS WINAPI LsaEnumerateTrustedDomains(LSA_HANDLE,PLSA_ENUMERATION_HANDLE,PVOID*,ULONG,PULONG);
278 NTSTATUS WINAPI LsaEnumerateTrustedDomainsEx(LSA_HANDLE,PLSA_ENUMERATION_HANDLE,PVOID*,ULONG,PULONG);
279 NTSTATUS WINAPI LsaFreeMemory(PVOID);
280 NTSTATUS WINAPI LsaLookupNames(LSA_HANDLE,ULONG,PLSA_UNICODE_STRING,PLSA_REFERENCED_DOMAIN_LIST*,
281 PLSA_TRANSLATED_SID*);
282 NTSTATUS WINAPI LsaLookupNames2(LSA_HANDLE,ULONG,ULONG,PLSA_UNICODE_STRING,PLSA_REFERENCED_DOMAIN_LIST*,
283 PLSA_TRANSLATED_SID2*);
284 NTSTATUS WINAPI LsaLookupSids(LSA_HANDLE,ULONG,PSID *,PLSA_REFERENCED_DOMAIN_LIST *,PLSA_TRANSLATED_NAME *);
285 ULONG WINAPI LsaNtStatusToWinError(NTSTATUS);
286 NTSTATUS WINAPI LsaOpenPolicy(PLSA_UNICODE_STRING,PLSA_OBJECT_ATTRIBUTES,ACCESS_MASK,PLSA_HANDLE);
287 NTSTATUS WINAPI LsaOpenTrustedDomainByName(LSA_HANDLE,PLSA_UNICODE_STRING,ACCESS_MASK,PLSA_HANDLE);
288 NTSTATUS WINAPI LsaQueryInformationPolicy(LSA_HANDLE,POLICY_INFORMATION_CLASS,PVOID*);
289 NTSTATUS WINAPI LsaQueryTrustedDomainInfo(LSA_HANDLE,PSID,TRUSTED_INFORMATION_CLASS,PVOID*);
290 NTSTATUS WINAPI LsaQueryTrustedDomainInfoByName(LSA_HANDLE,PLSA_UNICODE_STRING,TRUSTED_INFORMATION_CLASS,PVOID*);
291 NTSTATUS WINAPI LsaRegisterPolicyChangeNotification(POLICY_NOTIFICATION_INFORMATION_CLASS,HANDLE);
292 NTSTATUS WINAPI LsaRemoveAccountRights(LSA_HANDLE,PSID,BOOLEAN,PLSA_UNICODE_STRING,ULONG);
293 NTSTATUS WINAPI LsaRetrievePrivateData(LSA_HANDLE,PLSA_UNICODE_STRING,PLSA_UNICODE_STRING*);
294 NTSTATUS WINAPI LsaSetInformationPolicy(LSA_HANDLE,POLICY_INFORMATION_CLASS,PVOID);
295 NTSTATUS WINAPI LsaSetTrustedDomainInfoByName(LSA_HANDLE,PLSA_UNICODE_STRING,TRUSTED_INFORMATION_CLASS,PVOID);
296 NTSTATUS WINAPI LsaSetTrustedDomainInformation(LSA_HANDLE,PSID,TRUSTED_INFORMATION_CLASS,PVOID);
297 NTSTATUS WINAPI LsaStorePrivateData(LSA_HANDLE,PLSA_UNICODE_STRING,PLSA_UNICODE_STRING);
298 NTSTATUS WINAPI LsaUnregisterPolicyChangeNotification(POLICY_NOTIFICATION_INFORMATION_CLASS,HANDLE);
300 #ifdef __cplusplus
301 } /* extern "C" */
302 #endif /* defined(__cplusplus) */
304 #endif /* !defined(__WINE_NTSECAPI_H) */