Replaced slow and outdated character set handling in RTF reader by
[wine/multimedia.git] / include / ntsecapi.h
blob9a2079767b1ae0efc855afe8c412518e181b3968
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 typedef enum _SECURITY_LOGON_TYPE
111 Interactive = 2,
112 Network,
113 Batch,
114 Service,
115 Proxy
116 } SECURITY_LOGON_TYPE, *PSECURITY_LOGON_TYPE;
118 typedef enum _POLICY_AUDIT_EVENT_TYPE
120 AuditCategorySystem,
121 AuditCategoryLogon,
122 AuditCategoryObjectAccess,
123 AuditCategoryPrivilegeUse,
124 AuditCategoryDetailedTracking,
125 AuditCategoryPolicyChange,
126 AuditCategoryAccountManagement
127 } POLICY_AUDIT_EVENT_TYPE, *PPOLICY_AUDIT_EVENT_TYPE;
129 typedef UNICODE_STRING LSA_UNICODE_STRING, *PLSA_UNICODE_STRING;
130 typedef STRING LSA_STRING, *PLSA_STRING;
131 typedef OBJECT_ATTRIBUTES LSA_OBJECT_ATTRIBUTES, *PLSA_OBJECT_ATTRIBUTES;
133 typedef PVOID LSA_HANDLE, *PLSA_HANDLE;
134 typedef ULONG LSA_ENUMERATION_HANDLE, *PLSA_ENUMERATION_HANDLE;
136 typedef enum
138 PolicyAuditLogInformation = 1,
139 PolicyAuditEventsInformation,
140 PolicyPrimaryDomainInformation,
141 PolicyPdAccountInformation,
142 PolicyAccountDomainInformation,
143 PolicyLsaServerRoleInformation,
144 PolicyReplicaSourceInformation,
145 PolicyDefaultQuotaInformation,
146 PolicyModificationInformation,
147 PolicyAuditFullSetInformation,
148 PolicyAuditFullQueryInformation,
149 PolicyDnsDomainInformation
150 } POLICY_INFORMATION_CLASS, *PPOLICY_INFORMATION_CLASS;
152 typedef ULONG POLICY_AUDIT_EVENT_OPTIONS, *PPOLICY_AUDIT_EVENT_OPTIONS;
154 typedef struct _POLICY_AUDIT_EVENTS_INFO
156 BOOLEAN AuditingMode;
157 PPOLICY_AUDIT_EVENT_OPTIONS EventAuditingOptions;
158 ULONG MaximumAuditEventCount;
159 } POLICY_AUDIT_EVENTS_INFO, *PPOLICY_AUDIT_EVENTS_INFO;
161 typedef struct _POLICY_PRIMARY_DOMAIN_INFO
163 LSA_UNICODE_STRING Name;
164 PSID Sid;
165 } POLICY_PRIMARY_DOMAIN_INFO, *PPOLICY_PRIMARY_DOMAIN_INFO;
167 typedef struct _POLICY_ACCOUNT_DOMAIN_INFO
169 LSA_UNICODE_STRING DomainName;
170 PSID DomainSid;
171 } POLICY_ACCOUNT_DOMAIN_INFO, *PPOLICY_ACCOUNT_DOMAIN_INFO;
173 typedef struct
175 SID_NAME_USE Use;
176 LSA_UNICODE_STRING Name;
177 LONG DomainIndex;
178 } LSA_TRANSLATED_NAME, *PLSA_TRANSLATED_NAME;
180 typedef struct
182 LSA_UNICODE_STRING Name;
183 PSID Sid;
184 } LSA_TRUST_INFORMATION, *PLSA_TRUST_INFORMATION;
186 typedef struct
188 ULONG Entries;
189 PLSA_TRUST_INFORMATION Domains;
190 } LSA_REFERENCED_DOMAIN_LIST, *PLSA_REFERENCED_DOMAIN_LIST;
192 typedef struct _LSA_TRANSLATED_SID
194 SID_NAME_USE Use;
195 ULONG RelativeId;
196 LONG DomainIndex;
197 } LSA_TRANSLATED_SID, *PLSA_TRANSLATED_SID;
199 NTSTATUS WINAPI LsaClose(LSA_HANDLE);
200 NTSTATUS WINAPI LsaEnumerateTrustedDomains(LSA_HANDLE,PLSA_ENUMERATION_HANDLE,PVOID*,ULONG,PULONG);
201 NTSTATUS WINAPI LsaFreeMemory(PVOID);
202 NTSTATUS WINAPI LsaLookupNames(LSA_HANDLE,ULONG Count,PLSA_UNICODE_STRING,PLSA_REFERENCED_DOMAIN_LIST*,
203 PLSA_TRANSLATED_SID*);
204 NTSTATUS WINAPI LsaLookupSids(LSA_HANDLE,ULONG,PSID *,PLSA_REFERENCED_DOMAIN_LIST *,PLSA_TRANSLATED_NAME *);
205 ULONG WINAPI LsaNtStatusToWinError(NTSTATUS);
206 NTSTATUS WINAPI LsaOpenPolicy(PLSA_UNICODE_STRING,PLSA_OBJECT_ATTRIBUTES,ACCESS_MASK,PLSA_HANDLE);
207 NTSTATUS WINAPI LsaQueryInformationPolicy(LSA_HANDLE,POLICY_INFORMATION_CLASS,PVOID*);
208 NTSTATUS WINAPI LsaSetInformationPolicy(LSA_HANDLE,POLICY_INFORMATION_CLASS,PVOID);
210 #ifdef __cplusplus
211 } /* extern "C" */
212 #endif /* defined(__cplusplus) */
214 #endif /* !defined(__WINE_NTSECAPI_H) */