Work around MinGW mangling of "host:/path"
[msysgit/historical-msysgit.git] / mingw / include / ntsecapi.h
bloba57cfcac04936a5501181307c6abb30433daef91
1 #ifndef _NTSECAPI_H
2 #define _NTSECAPI_H
3 #if __GNUC__ >=3
4 #pragma GCC system_header
5 #endif
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10 #define KERB_WRAP_NO_ENCRYPT 0x80000001
11 #define LOGON_GUEST 1
12 #define LOGON_NOENCRYPTION 2
13 #define LOGON_CACHED_ACCOUNT 4
14 #define LOGON_USED_LM_PASSWORD 8
15 #define LOGON_EXTRA_SIDS 32
16 #define LOGON_SUBAUTH_SESSION_KEY 64
17 #define LOGON_SERVER_TRUST_ACCOUNT 128
18 #define LOGON_NTLMV2_ENABLED 256
19 #define LOGON_RESOURCE_GROUPS 512
20 #define LOGON_PROFILE_PATH_RETURNED 1024
21 #define LOGON_GRACE_LOGON 16777216
22 #define LSA_MODE_PASSWORD_PROTECTED 1
23 #define LSA_MODE_INDIVIDUAL_ACCOUNTS 2
24 #define LSA_MODE_MANDATORY_ACCESS 3
25 #define LSA_MODE_LOG_FULL 4
26 #define LSA_SUCCESS(x) ((LONG)(x)>=0)
27 #define MICROSOFT_KERBEROS_NAME_A "Kerberos"
28 #define MICROSOFT_KERBEROS_NAME_W L"Kerberos"
29 #define MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT 32
30 #define MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT 2048
31 #define MSV1_0_CHALLENGE_LENGTH 8
32 #define MSV1_0_CLEARTEXT_PASSWORD_ALLOWED 2
33 #define MSV1_0_CRED_LM_PRESENT 1
34 #define MSV1_0_CRED_NT_PRESENT 2
35 #define MSV1_0_CRED_VERSION 0
36 #define MSV1_0_DONT_TRY_GUEST_ACCOUNT 16
37 #define MSV1_0_LANMAN_SESSION_KEY_LENGTH 8
38 #define MSV1_0_MAX_NTLM3_LIFE 1800
39 #define MSV1_0_MAX_AVL_SIZE 64000
40 #define MSV1_0_MNS_LOGON 16777216
41 #define MSV1_0_NTLM3_RESPONSE_LENGTH 16
42 #define MSV1_0_NTLM3_OWF_LENGTH 16
43 #define MSV1_0_NTLM3_INPUT_LENGTH (sizeof(MSV1_0_NTLM3_RESPONSE)-MSV1_0_NTLM3_RESPONSE_LENGTH)
44 #define MSV1_0_OWF_PASSWORD_LENGTH 16
45 #define MSV1_0_PACKAGE_NAME "MICROSOFT_AUTHENTICATION_PACKAGE_V1_0"
46 #define MSV1_0_PACKAGE_NAMEW L"MICROSOFT_AUTHENTICATION_PACKAGE_V1_0"
47 #define MSV1_0_PACKAGE_NAMEW_LENGTH sizeof(MSV1_0_PACKAGE_NAMEW)-sizeof(WCHAR)
48 #define MSV1_0_RETURN_USER_PARAMETERS 8
49 #define MSV1_0_RETURN_PASSWORD_EXPIRY 64
50 #define MSV1_0_RETURN_PROFILE_PATH 512
51 #define MSV1_0_SUBAUTHENTICATION_DLL_EX 1048576
52 #define MSV1_0_SUBAUTHENTICATION_DLL 0xff000000
53 #define MSV1_0_SUBAUTHENTICATION_DLL_SHIFT 24
54 #define MSV1_0_SUBAUTHENTICATION_DLL_RAS 2
55 #define MSV1_0_SUBAUTHENTICATION_DLL_IIS 132
56 #define MSV1_0_SUBAUTHENTICATION_FLAGS 0xff000000
57 #define MSV1_0_SUBAUTHENTICATION_KEY "System\\CurrentControlSet\\Control\\Lsa\\MSV1_0"
58 #define MSV1_0_SUBAUTHENTICATION_VALUE "Auth"
59 #define MSV1_0_TRY_GUEST_ACCOUNT_ONLY 256
60 #define MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY 1024
61 #define MSV1_0_UPDATE_LOGON_STATISTICS 4
62 #define MSV1_0_USE_CLIENT_CHALLENGE 128
63 #define MSV1_0_USER_SESSION_KEY_LENGTH 16
64 #define POLICY_VIEW_LOCAL_INFORMATION 1
65 #define POLICY_VIEW_AUDIT_INFORMATION 2
66 #define POLICY_GET_PRIVATE_INFORMATION 4
67 #define POLICY_TRUST_ADMIN 8
68 #define POLICY_CREATE_ACCOUNT 16
69 #define POLICY_CREATE_SECRET 32
70 #define POLICY_CREATE_PRIVILEGE 64
71 #define POLICY_SET_DEFAULT_QUOTA_LIMITS 128
72 #define POLICY_SET_AUDIT_REQUIREMENTS 256
73 #define POLICY_AUDIT_LOG_ADMIN 512
74 #define POLICY_SERVER_ADMIN 1024
75 #define POLICY_LOOKUP_NAMES 2048
76 #define POLICY_READ (STANDARD_RIGHTS_READ|6)
77 #define POLICY_WRITE (STANDARD_RIGHTS_WRITE|2040)
78 #define POLICY_EXECUTE (STANDARD_RIGHTS_EXECUTE|2049)
79 #define POLICY_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|4095)
80 #define POLICY_AUDIT_EVENT_UNCHANGED 0
81 #define POLICY_AUDIT_EVENT_SUCCESS 1
82 #define POLICY_AUDIT_EVENT_FAILURE 2
83 #define POLICY_AUDIT_EVENT_NONE 4
84 #define POLICY_AUDIT_EVENT_MASK 7
85 #define POLICY_LOCATION_LOCAL 1
86 #define POLICY_LOCATION_DS 2
87 #define POLICY_MACHINE_POLICY_LOCAL 0
88 #define POLICY_MACHINE_POLICY_DEFAULTED 1
89 #define POLICY_MACHINE_POLICY_EXPLICIT 2
90 #define POLICY_MACHINE_POLICY_UNKNOWN 0xFFFFFFFF
91 #define POLICY_QOS_SCHANEL_REQUIRED 1
92 #define POLICY_QOS_OUTBOUND_INTEGRITY 2
93 #define POLICY_QOS_OUTBOUND_CONFIDENTIALITY 4
94 #define POLICY_QOS_INBOUND_INTEGREITY 8
95 #define POLICY_QOS_INBOUND_CONFIDENTIALITY 16
96 #define POLICY_QOS_ALLOW_LOCAL_ROOT_CERT_STORE 32
97 #define POLICY_QOS_RAS_SERVER_ALLOWED 64
98 #define POLICY_QOS_DHCP_SERVER_ALLOWD 128
99 #define POLICY_KERBEROS_FORWARDABLE 1
100 #define POLICY_KERBEROS_PROXYABLE 2
101 #define POLICY_KERBEROS_RENEWABLE 4
102 #define POLICY_KERBEROS_POSTDATEABLE 8
103 #define SAM_PASSWORD_CHANGE_NOTIFY_ROUTINE "PasswordChangeNotify"
104 #define SAM_INIT_NOTIFICATION_ROUTINE "InitializeChangeNotify"
105 #define SAM_PASSWORD_FILTER_ROUTINE "PasswordFilter"
106 #define SE_INTERACTIVE_LOGON_NAME TEXT("SeInteractiveLogonRight")
107 #define SE_NETWORK_LOGON_NAME TEXT("SeNetworkLogonRight")
108 #define SE_BATCH_LOGON_NAME TEXT("SeBatchLogonRight")
109 #define SE_SERVICE_LOGON_NAME TEXT("SeServiceLogonRight")
110 #define TRUST_ATTRIBUTE_NON_TRANSITIVE 1
111 #define TRUST_ATTRIBUTE_UPLEVEL_ONLY 2
112 #define TRUST_ATTRIBUTE_TREE_PARENT 4194304
113 #define TRUST_ATTRIBUTES_VALID -16580609
114 #define TRUST_AUTH_TYPE_NONE 0
115 #define TRUST_AUTH_TYPE_NT4OWF 1
116 #define TRUST_AUTH_TYPE_CLEAR 2
117 #define TRUST_DIRECTION_DISABLED 0
118 #define TRUST_DIRECTION_INBOUND 1
119 #define TRUST_DIRECTION_OUTBOUND 2
120 #define TRUST_DIRECTION_BIDIRECTIONAL 3
121 #define TRUST_TYPE_DOWNLEVEL 1
122 #define TRUST_TYPE_UPLEVEL 2
123 #define TRUST_TYPE_MIT 3
124 #define TRUST_TYPE_DCE 4
125 #if !defined(_NTDEF_H) && !defined(_SUBAUTH_H)
126 typedef LONG NTSTATUS, *PNTSTATUS;
127 typedef struct _UNICODE_STRING {
128 USHORT Length;
129 USHORT MaximumLength;
130 PWSTR Buffer;
131 } UNICODE_STRING, *PUNICODE_STRING;
132 typedef const UNICODE_STRING* PCUNICODE_STRING;
133 typedef struct _STRING {
134 USHORT Length;
135 USHORT MaximumLength;
136 PCHAR Buffer;
137 } STRING, *PSTRING;
138 #endif
139 typedef UNICODE_STRING LSA_UNICODE_STRING, *PLSA_UNICODE_STRING;
140 typedef STRING LSA_STRING, *PLSA_STRING;
141 typedef enum _MSV1_0_LOGON_SUBMIT_TYPE {
142 MsV1_0InteractiveLogon = 2,
143 MsV1_0Lm20Logon,
144 MsV1_0NetworkLogon,
145 MsV1_0SubAuthLogon,
146 MsV1_0WorkstationUnlockLogon = 7
147 } MSV1_0_LOGON_SUBMIT_TYPE, *PMSV1_0_LOGON_SUBMIT_TYPE;
148 typedef enum _MSV1_0_PROFILE_BUFFER_TYPE {
149 MsV1_0InteractiveProfile = 2,
150 MsV1_0Lm20LogonProfile,
151 MsV1_0SmartCardProfile
152 } MSV1_0_PROFILE_BUFFER_TYPE, *PMSV1_0_PROFILE_BUFFER_TYPE;
153 typedef enum {
154 MsvAvEOL,
155 MsvAvNbComputerName,
156 MsvAvNbDomainName,
157 MsvAvDnsComputerName,
158 MsvAvDnsDomainName
159 } MSV1_0_AVID;
160 typedef enum _MSV1_0_PROTOCOL_MESSAGE_TYPE {
161 MsV1_0Lm20ChallengeRequest = 0,
162 MsV1_0Lm20GetChallengeResponse,
163 MsV1_0EnumerateUsers,
164 MsV1_0GetUserInfo,
165 MsV1_0ReLogonUsers,
166 MsV1_0ChangePassword,
167 MsV1_0ChangeCachedPassword,
168 MsV1_0GenericPassthrough,
169 MsV1_0CacheLogon,
170 MsV1_0SubAuth,
171 MsV1_0DeriveCredential,
172 MsV1_0CacheLookup
173 } MSV1_0_PROTOCOL_MESSAGE_TYPE, *PMSV1_0_PROTOCOL_MESSAGE_TYPE;
174 typedef enum _POLICY_LSA_SERVER_ROLE {
175 PolicyServerRoleBackup = 2,
176 PolicyServerRolePrimary
177 } POLICY_LSA_SERVER_ROLE, *PPOLICY_LSA_SERVER_ROLE;
178 typedef enum _POLICY_SERVER_ENABLE_STATE {
179 PolicyServerEnabled = 2,
180 PolicyServerDisabled
181 } POLICY_SERVER_ENABLE_STATE, *PPOLICY_SERVER_ENABLE_STATE;
182 typedef enum _POLICY_INFORMATION_CLASS {
183 PolicyAuditLogInformation = 1,
184 PolicyAuditEventsInformation,
185 PolicyPrimaryDomainInformation,
186 PolicyPdAccountInformation,
187 PolicyAccountDomainInformation,
188 PolicyLsaServerRoleInformation,
189 PolicyReplicaSourceInformation,
190 PolicyDefaultQuotaInformation,
191 PolicyModificationInformation,
192 PolicyAuditFullSetInformation,
193 PolicyAuditFullQueryInformation,
194 PolicyDnsDomainInformation,
195 PolicyEfsInformation
196 } POLICY_INFORMATION_CLASS, *PPOLICY_INFORMATION_CLASS;
197 typedef enum _POLICY_AUDIT_EVENT_TYPE {
198 AuditCategorySystem,
199 AuditCategoryLogon,
200 AuditCategoryObjectAccess,
201 AuditCategoryPrivilegeUse,
202 AuditCategoryDetailedTracking,
203 AuditCategoryPolicyChange,
204 AuditCategoryAccountManagement,
205 AuditCategoryDirectoryServiceAccess,
206 AuditCategoryAccountLogon
207 } POLICY_AUDIT_EVENT_TYPE, *PPOLICY_AUDIT_EVENT_TYPE;
208 typedef enum _POLICY_LOCAL_INFORMATION_CLASS {
209 PolicyLocalAuditEventsInformation = 1,
210 PolicyLocalPdAccountInformation,
211 PolicyLocalAccountDomainInformation,
212 PolicyLocalLsaServerRoleInformation,
213 PolicyLocalReplicaSourceInformation,
214 PolicyLocalModificationInformation,
215 PolicyLocalAuditFullSetInformation,
216 PolicyLocalAuditFullQueryInformation,
217 PolicyLocalDnsDomainInformation,
218 PolicyLocalIPSecReferenceInformation,
219 PolicyLocalMachinePasswordInformation,
220 PolicyLocalQualityOfServiceInformation,
221 PolicyLocalPolicyLocationInformation
222 } POLICY_LOCAL_INFORMATION_CLASS, *PPOLICY_LOCAL_INFORMATION_CLASS;
223 typedef enum _POLICY_DOMAIN_INFORMATION_CLASS {
224 PolicyDomainIPSecReferenceInformation = 1,
225 PolicyDomainQualityOfServiceInformation,
226 PolicyDomainEfsInformation,
227 PolicyDomainPublicKeyInformation,
228 PolicyDomainPasswordPolicyInformation,
229 PolicyDomainLockoutInformation,
230 PolicyDomainKerberosTicketInformation
231 } POLICY_DOMAIN_INFORMATION_CLASS, *PPOLICY_DOMAIN_INFORMATION_CLASS;
232 typedef enum _SECURITY_LOGON_TYPE {
233 Interactive = 2,
234 Network,
235 Batch,
236 Service,
237 Proxy,
238 Unlock
239 } SECURITY_LOGON_TYPE, *PSECURITY_LOGON_TYPE;
240 typedef enum _TRUSTED_INFORMATION_CLASS {
241 TrustedDomainNameInformation = 1,
242 TrustedControllersInformation,
243 TrustedPosixOffsetInformation,
244 TrustedPasswordInformation,
245 TrustedDomainInformationBasic,
246 TrustedDomainInformationEx,
247 TrustedDomainAuthInformation,
248 TrustedDomainFullInformation
249 } TRUSTED_INFORMATION_CLASS, *PTRUSTED_INFORMATION_CLASS;
250 typedef struct _DOMAIN_PASSWORD_INFORMATION {
251 USHORT MinPasswordLength;
252 USHORT PasswordHistoryLength;
253 ULONG PasswordProperties;
254 LARGE_INTEGER MaxPasswordAge;
255 LARGE_INTEGER MinPasswordAge;
256 } DOMAIN_PASSWORD_INFORMATION, *PDOMAIN_PASSWORD_INFORMATION;
257 typedef ULONG LSA_ENUMERATION_HANDLE, *PLSA_ENUMERATION_HANDLE;
258 typedef struct _LSA_ENUMERATION_INFORMATION {
259 PSID Sid;
260 } LSA_ENUMERATION_INFORMATION, *PLSA_ENUMERATION_INFORMATION;
261 typedef ULONG LSA_OPERATIONAL_MODE, *PLSA_OPERATIONAL_MODE;
262 #if !defined(_NTDEF_H)
263 typedef struct _LSA_OBJECT_ATTRIBUTES {
264 ULONG Length;
265 HANDLE RootDirectory;
266 PLSA_UNICODE_STRING ObjectName;
267 ULONG Attributes;
268 PVOID SecurityDescriptor;
269 PVOID SecurityQualityOfService;
270 } OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;
271 #endif
272 typedef OBJECT_ATTRIBUTES LSA_OBJECT_ATTRIBUTES, *PLSA_OBJECT_ATTRIBUTES;
273 typedef struct _LSA_TRUST_INFORMATION {
274 LSA_UNICODE_STRING Name;
275 PSID Sid;
276 } LSA_TRUST_INFORMATION, *PLSA_TRUST_INFORMATION;
277 typedef struct _LSA_REFERENCED_DOMAIN_LIST {
278 ULONG Entries;
279 PLSA_TRUST_INFORMATION Domains;
280 } LSA_REFERENCED_DOMAIN_LIST, *PLSA_REFERENCED_DOMAIN_LIST;
281 typedef struct _LSA_TRANSLATED_SID {
282 SID_NAME_USE Use;
283 ULONG RelativeId;
284 LONG DomainIndex;
285 } LSA_TRANSLATED_SID, *PLSA_TRANSLATED_SID;
286 typedef struct _LSA_TRANSLATED_NAME {
287 SID_NAME_USE Use;
288 LSA_UNICODE_STRING Name;
289 LONG DomainIndex;
290 } LSA_TRANSLATED_NAME, *PLSA_TRANSLATED_NAME;
291 typedef struct _MSV1_0_INTERACTIVE_LOGON {
292 MSV1_0_LOGON_SUBMIT_TYPE MessageType;
293 UNICODE_STRING LogonDomainName;
294 UNICODE_STRING UserName;
295 UNICODE_STRING Password;
296 } MSV1_0_INTERACTIVE_LOGON, *PMSV1_0_INTERACTIVE_LOGON;
297 typedef struct _MSV1_0_INTERACTIVE_PROFILE {
298 MSV1_0_PROFILE_BUFFER_TYPE MessageType;
299 USHORT LogonCount;
300 USHORT BadPasswordCount;
301 LARGE_INTEGER LogonTime;
302 LARGE_INTEGER LogoffTime;
303 LARGE_INTEGER KickOffTime;
304 LARGE_INTEGER PasswordLastSet;
305 LARGE_INTEGER PasswordCanChange;
306 LARGE_INTEGER PasswordMustChange;
307 UNICODE_STRING LogonScript;
308 UNICODE_STRING HomeDirectory;
309 UNICODE_STRING FullName;
310 UNICODE_STRING ProfilePath;
311 UNICODE_STRING HomeDirectoryDrive;
312 UNICODE_STRING LogonServer;
313 ULONG UserFlags;
314 } MSV1_0_INTERACTIVE_PROFILE, *PMSV1_0_INTERACTIVE_PROFILE;
315 typedef struct _MSV1_0_LM20_LOGON {
316 MSV1_0_LOGON_SUBMIT_TYPE MessageType;
317 UNICODE_STRING LogonDomainName;
318 UNICODE_STRING UserName;
319 UNICODE_STRING Workstation;
320 UCHAR ChallengeToClient[MSV1_0_CHALLENGE_LENGTH];
321 STRING CaseSensitiveChallengeResponse;
322 STRING CaseInsensitiveChallengeResponse;
323 ULONG ParameterControl;
324 } MSV1_0_LM20_LOGON, * PMSV1_0_LM20_LOGON;
325 typedef struct _MSV1_0_SUBAUTH_LOGON{ /* W2K only */
326 MSV1_0_LOGON_SUBMIT_TYPE MessageType;
327 UNICODE_STRING LogonDomainName;
328 UNICODE_STRING UserName;
329 UNICODE_STRING Workstation;
330 UCHAR ChallengeToClient[MSV1_0_CHALLENGE_LENGTH];
331 STRING AuthenticationInfo1;
332 STRING AuthenticationInfo2;
333 ULONG ParameterControl;
334 ULONG SubAuthPackageId;
335 } MSV1_0_SUBAUTH_LOGON, * PMSV1_0_SUBAUTH_LOGON;
336 typedef struct _MSV1_0_LM20_LOGON_PROFILE {
337 MSV1_0_PROFILE_BUFFER_TYPE MessageType;
338 LARGE_INTEGER KickOffTime;
339 LARGE_INTEGER LogoffTime;
340 ULONG UserFlags;
341 UCHAR UserSessionKey[MSV1_0_USER_SESSION_KEY_LENGTH];
342 UNICODE_STRING LogonDomainName;
343 UCHAR LanmanSessionKey[MSV1_0_LANMAN_SESSION_KEY_LENGTH];
344 UNICODE_STRING LogonServer;
345 UNICODE_STRING UserParameters;
346 } MSV1_0_LM20_LOGON_PROFILE, * PMSV1_0_LM20_LOGON_PROFILE;
347 typedef struct _MSV1_0_SUPPLEMENTAL_CREDENTIAL {
348 ULONG Version;
349 ULONG Flags;
350 UCHAR LmPassword[MSV1_0_OWF_PASSWORD_LENGTH];
351 UCHAR NtPassword[MSV1_0_OWF_PASSWORD_LENGTH];
352 } MSV1_0_SUPPLEMENTAL_CREDENTIAL, *PMSV1_0_SUPPLEMENTAL_CREDENTIAL;
353 typedef struct _MSV1_0_NTLM3_RESPONSE {
354 UCHAR Response[MSV1_0_NTLM3_RESPONSE_LENGTH];
355 UCHAR RespType;
356 UCHAR HiRespType;
357 USHORT Flags;
358 ULONG MsgWord;
359 ULONGLONG TimeStamp;
360 UCHAR ChallengeFromClient[MSV1_0_CHALLENGE_LENGTH];
361 ULONG AvPairsOff;
362 UCHAR Buffer[1];
363 } MSV1_0_NTLM3_RESPONSE, *PMSV1_0_NTLM3_RESPONSE;
364 typedef struct _MSV1_0_AV_PAIR {
365 USHORT AvId;
366 USHORT AvLen;
367 } MSV1_0_AV_PAIR, *PMSV1_0_AV_PAIR;
368 typedef struct _MSV1_0_CHANGEPASSWORD_REQUEST {
369 MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
370 UNICODE_STRING DomainName;
371 UNICODE_STRING AccountName;
372 UNICODE_STRING OldPassword;
373 UNICODE_STRING NewPassword;
374 BOOLEAN Impersonating;
375 } MSV1_0_CHANGEPASSWORD_REQUEST, *PMSV1_0_CHANGEPASSWORD_REQUEST;
376 typedef struct _MSV1_0_CHANGEPASSWORD_RESPONSE {
377 MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
378 BOOLEAN PasswordInfoValid;
379 DOMAIN_PASSWORD_INFORMATION DomainPasswordInfo;
380 } MSV1_0_CHANGEPASSWORD_RESPONSE, *PMSV1_0_CHANGEPASSWORD_RESPONSE;
381 typedef struct _MSV1_0_SUBAUTH_REQUEST{
382 MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
383 ULONG SubAuthPackageId;
384 ULONG SubAuthInfoLength;
385 PUCHAR SubAuthSubmitBuffer;
386 } MSV1_0_SUBAUTH_REQUEST, *PMSV1_0_SUBAUTH_REQUEST;
387 typedef struct _MSV1_0_SUBAUTH_RESPONSE{
388 MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
389 ULONG SubAuthInfoLength;
390 PUCHAR SubAuthReturnBuffer;
391 } MSV1_0_SUBAUTH_RESPONSE, *PMSV1_0_SUBAUTH_RESPONSE;
392 #define MSV1_0_DERIVECRED_TYPE_SHA1 0
393 typedef struct _MSV1_0_DERIVECRED_REQUEST {
394 MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
395 LUID LogonId;
396 ULONG DeriveCredType;
397 ULONG DeriveCredInfoLength;
398 UCHAR DeriveCredSubmitBuffer[1];
399 } MSV1_0_DERIVECRED_REQUEST, *PMSV1_0_DERIVECRED_REQUEST;
400 typedef struct _MSV1_0_DERIVECRED_RESPONSE {
401 MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
402 ULONG DeriveCredInfoLength;
403 UCHAR DeriveCredReturnBuffer[1];
404 } MSV1_0_DERIVECRED_RESPONSE, *PMSV1_0_DERIVECRED_RESPONSE;
405 typedef ULONG POLICY_AUDIT_EVENT_OPTIONS, *PPOLICY_AUDIT_EVENT_OPTIONS;
406 typedef struct _POLICY_PRIVILEGE_DEFINITION {
407 LSA_UNICODE_STRING Name;
408 LUID LocalValue;
409 } POLICY_PRIVILEGE_DEFINITION, *PPOLICY_PRIVILEGE_DEFINITION;
410 typedef struct _POLICY_AUDIT_LOG_INFO {
411 ULONG AuditLogPercentFull;
412 ULONG MaximumLogSize;
413 LARGE_INTEGER AuditRetentionPeriod;
414 BOOLEAN AuditLogFullShutdownInProgress;
415 LARGE_INTEGER TimeToShutdown;
416 ULONG NextAuditRecordId;
417 } POLICY_AUDIT_LOG_INFO, *PPOLICY_AUDIT_LOG_INFO;
418 typedef struct _POLICY_AUDIT_EVENTS_INFO {
419 BOOLEAN AuditingMode;
420 PPOLICY_AUDIT_EVENT_OPTIONS EventAuditingOptions;
421 ULONG MaximumAuditEventCount;
422 } POLICY_AUDIT_EVENTS_INFO, *PPOLICY_AUDIT_EVENTS_INFO;
423 typedef struct _POLICY_ACCOUNT_DOMAIN_INFO {
424 LSA_UNICODE_STRING DomainName;
425 PSID DomainSid;
426 } POLICY_ACCOUNT_DOMAIN_INFO, *PPOLICY_ACCOUNT_DOMAIN_INFO;
427 typedef struct _POLICY_PRIMARY_DOMAIN_INFO {
428 LSA_UNICODE_STRING Name;
429 PSID Sid;
430 } POLICY_PRIMARY_DOMAIN_INFO, *PPOLICY_PRIMARY_DOMAIN_INFO;
431 typedef struct _POLICY_DNS_DOMAIN_INFO {
432 LSA_UNICODE_STRING Name;
433 LSA_UNICODE_STRING DnsDomainName;
434 LSA_UNICODE_STRING DnsForestName;
435 GUID DomainGuid;
436 PSID Sid;
437 } POLICY_DNS_DOMAIN_INFO, *PPOLICY_DNS_DOMAIN_INFO;
438 typedef struct _POLICY_PD_ACCOUNT_INFO {
439 LSA_UNICODE_STRING Name;
440 } POLICY_PD_ACCOUNT_INFO, *PPOLICY_PD_ACCOUNT_INFO;
441 typedef struct _POLICY_LSA_SERVER_ROLE_INFO {
442 POLICY_LSA_SERVER_ROLE LsaServerRole;
443 } POLICY_LSA_SERVER_ROLE_INFO, *PPOLICY_LSA_SERVER_ROLE_INFO;
444 typedef struct _POLICY_REPLICA_SOURCE_INFO {
445 LSA_UNICODE_STRING ReplicaSource;
446 LSA_UNICODE_STRING ReplicaAccountName;
447 } POLICY_REPLICA_SOURCE_INFO, *PPOLICY_REPLICA_SOURCE_INFO;
448 typedef struct _POLICY_DEFAULT_QUOTA_INFO {
449 QUOTA_LIMITS QuotaLimits;
450 } POLICY_DEFAULT_QUOTA_INFO, *PPOLICY_DEFAULT_QUOTA_INFO;
451 typedef struct _POLICY_MODIFICATION_INFO {
452 LARGE_INTEGER ModifiedId;
453 LARGE_INTEGER DatabaseCreationTime;
454 } POLICY_MODIFICATION_INFO, *PPOLICY_MODIFICATION_INFO;
455 typedef struct _POLICY_AUDIT_FULL_SET_INFO {
456 BOOLEAN ShutDownOnFull;
457 } POLICY_AUDIT_FULL_SET_INFO, *PPOLICY_AUDIT_FULL_SET_INFO;
458 typedef struct _POLICY_AUDIT_FULL_QUERY_INFO {
459 BOOLEAN ShutDownOnFull;
460 BOOLEAN LogIsFull;
461 } POLICY_AUDIT_FULL_QUERY_INFO, *PPOLICY_AUDIT_FULL_QUERY_INFO;
462 typedef struct _POLICY_EFS_INFO {
463 ULONG InfoLength;
464 PUCHAR EfsBlob;
465 } POLICY_EFS_INFO, *PPOLICY_EFS_INFO;
466 typedef struct _POLICY_LOCAL_IPSEC_REFERENCE_INFO {
467 LSA_UNICODE_STRING ObjectPath;
468 } POLICY_LOCAL_IPSEC_REFERENCE_INFO, *PPOLICY_LOCAL_IPSEC_REFERENCE_INFO;
469 typedef struct _POLICY_LOCAL_MACHINE_PASSWORD_INFO {
470 LARGE_INTEGER PasswordChangeInterval;
471 } POLICY_LOCAL_MACHINE_PASSWORD_INFO, *PPOLICY_LOCAL_MACHINE_PASSWORD_INFO;
472 typedef struct _POLICY_LOCAL_POLICY_LOCATION_INFO {
473 ULONG PolicyLocation;
474 } POLICY_LOCAL_POLICY_LOCATION_INFO, *PPOLICY_LOCAL_POLICY_LOCATION_INFO;
475 typedef struct _POLICY_LOCAL_QUALITY_OF_SERVICE_INFO {
476 ULONG QualityOfService;
477 } POLICY_LOCAL_QUALITY_OF_SERVICE_INFO, *PPOLICY_LOCAL_QUALITY_OF_SERVICE_INFO;
478 typedef struct _POLICY_LOCAL_QUALITY_OF_SERVICE_INFO POLICY_DOMAIN_QUALITY_OF_SERVICE_INFO;
479 typedef struct _POLICY_LOCAL_QUALITY_OF_SERVICE_INFO *PPOLICY_DOMAIN_QUALITY_OF_SERVICE_INFO;
480 typedef struct _POLICY_DOMAIN_PUBLIC_KEY_INFO {
481 ULONG InfoLength;
482 PUCHAR PublicKeyInfo;
483 } POLICY_DOMAIN_PUBLIC_KEY_INFO, *PPOLICY_DOMAIN_PUBLIC_KEY_INFO;
484 typedef struct _POLICY_DOMAIN_LOCKOUT_INFO {
485 LARGE_INTEGER LockoutDuration;
486 LARGE_INTEGER LockoutObservationWindow;
487 USHORT LockoutThreshold;
488 } POLICY_DOMAIN_LOCKOUT_INFO, *PPOLICY_DOMAIN_LOCKOUT_INFO;
489 typedef struct _POLICY_DOMAIN_PASSWORD_INFO {
490 USHORT MinPasswordLength;
491 USHORT PasswordHistoryLength;
492 ULONG PasswordProperties;
493 LARGE_INTEGER MaxPasswordAge;
494 LARGE_INTEGER MinPasswordAge;
495 } POLICY_DOMAIN_PASSWORD_INFO, *PPOLICY_DOMAIN_PASSWORD_INFO;
496 typedef struct _POLICY_DOMAIN_KERBEROS_TICKET_INFO {
497 ULONG AuthenticationOptions;
498 LARGE_INTEGER MinTicketAge;
499 LARGE_INTEGER MaxTicketAge;
500 LARGE_INTEGER MaxRenewAge;
501 LARGE_INTEGER ProxyLifetime;
502 LARGE_INTEGER ForceLogoff;
503 } POLICY_DOMAIN_KERBEROS_TICKET_INFO, *PPOLICY_DOMAIN_KERBEROS_TICKET_INFO;
504 typedef PVOID LSA_HANDLE, *PLSA_HANDLE;
505 typedef struct _TRUSTED_DOMAIN_NAME_INFO {
506 LSA_UNICODE_STRING Name;
507 } TRUSTED_DOMAIN_NAME_INFO, *PTRUSTED_DOMAIN_NAME_INFO;
508 typedef struct _TRUSTED_CONTROLLERS_INFO {
509 ULONG Entries;
510 PLSA_UNICODE_STRING Names;
511 } TRUSTED_CONTROLLERS_INFO, *PTRUSTED_CONTROLLERS_INFO;
512 typedef struct _TRUSTED_POSIX_OFFSET_INFO {
513 ULONG Offset;
514 } TRUSTED_POSIX_OFFSET_INFO, *PTRUSTED_POSIX_OFFSET_INFO;
515 typedef struct _TRUSTED_PASSWORD_INFO {
516 LSA_UNICODE_STRING Password;
517 LSA_UNICODE_STRING OldPassword;
518 } TRUSTED_PASSWORD_INFO, *PTRUSTED_PASSWORD_INFO;
519 typedef LSA_TRUST_INFORMATION TRUSTED_DOMAIN_INFORMATION_BASIC;
520 typedef PLSA_TRUST_INFORMATION *PTRUSTED_DOMAIN_INFORMATION_BASIC;
521 typedef struct _TRUSTED_DOMAIN_INFORMATION_EX {
522 LSA_UNICODE_STRING Name;
523 LSA_UNICODE_STRING FlatName;
524 PSID Sid;
525 ULONG TrustDirection;
526 ULONG TrustType;
527 ULONG TrustAttributes;
528 } TRUSTED_DOMAIN_INFORMATION_EX, *PTRUSTED_DOMAIN_INFORMATION_EX;
529 typedef struct _LSA_AUTH_INFORMATION {
530 LARGE_INTEGER LastUpdateTime;
531 ULONG AuthType;
532 ULONG AuthInfoLength;
533 PUCHAR AuthInfo;
534 } LSA_AUTH_INFORMATION, *PLSA_AUTH_INFORMATION;
535 typedef struct _TRUSTED_DOMAIN_AUTH_INFORMATION {
536 ULONG IncomingAuthInfos;
537 PLSA_AUTH_INFORMATION IncomingAuthenticationInformation;
538 PLSA_AUTH_INFORMATION IncomingPreviousAuthenticationInformation;
539 ULONG OutgoingAuthInfos;
540 PLSA_AUTH_INFORMATION OutgoingAuthenticationInformation;
541 PLSA_AUTH_INFORMATION OutgoingPreviousAuthenticationInformation;
542 } TRUSTED_DOMAIN_AUTH_INFORMATION, *PTRUSTED_DOMAIN_AUTH_INFORMATION;
543 typedef struct _TRUSTED_DOMAIN_FULL_INFORMATION {
544 TRUSTED_DOMAIN_INFORMATION_EX Information;
545 TRUSTED_POSIX_OFFSET_INFO PosixOffset;
546 TRUSTED_DOMAIN_AUTH_INFORMATION AuthInformation;
547 } TRUSTED_DOMAIN_FULL_INFORMATION, *PTRUSTED_DOMAIN_FULL_INFORMATION;
548 NTSTATUS NTAPI LsaAddAccountRights(LSA_HANDLE,PSID,PLSA_UNICODE_STRING,ULONG);
549 NTSTATUS NTAPI LsaCallAuthenticationPackage(HANDLE,ULONG,PVOID,ULONG,PVOID*,
550 PULONG,PNTSTATUS);
551 NTSTATUS NTAPI LsaClose(LSA_HANDLE);
552 NTSTATUS NTAPI LsaConnectUntrusted(PHANDLE);
553 NTSTATUS NTAPI LsaCreateTrustedDomainEx(LSA_HANDLE,
554 PTRUSTED_DOMAIN_INFORMATION_EX,
555 PTRUSTED_DOMAIN_AUTH_INFORMATION,ACCESS_MASK,
556 PLSA_HANDLE);
557 NTSTATUS NTAPI LsaDeleteTrustedDomain(LSA_HANDLE,PSID);
558 NTSTATUS NTAPI LsaDeregisterLogonProcess(HANDLE);
559 NTSTATUS NTAPI LsaEnumerateAccountRights(LSA_HANDLE,PSID,PLSA_UNICODE_STRING*,PULONG);
560 NTSTATUS NTAPI LsaEnumerateAccountsWithUserRight(LSA_HANDLE,PLSA_UNICODE_STRING,
561 PVOID*,PULONG);
562 NTSTATUS NTAPI LsaEnumerateTrustedDomains(LSA_HANDLE,PLSA_ENUMERATION_HANDLE,
563 PVOID*,ULONG,PULONG);
564 NTSTATUS NTAPI LsaEnumerateTrustedDomainsEx(LSA_HANDLE,PLSA_ENUMERATION_HANDLE,
565 TRUSTED_INFORMATION_CLASS,PVOID*,ULONG,PULONG);
566 NTSTATUS NTAPI LsaFreeMemory(PVOID);
567 NTSTATUS NTAPI LsaFreeReturnBuffer(PVOID);
568 NTSTATUS NTAPI LsaLogonUser(HANDLE,PLSA_STRING,SECURITY_LOGON_TYPE,ULONG,PVOID,
569 ULONG,PTOKEN_GROUPS,PTOKEN_SOURCE,PVOID*,PULONG,
570 PLUID,PHANDLE,PQUOTA_LIMITS,PNTSTATUS);
571 NTSTATUS NTAPI LsaLookupAuthenticationPackage(HANDLE,PLSA_STRING,PULONG);
572 NTSTATUS NTAPI LsaLookupNames(LSA_HANDLE,ULONG,PLSA_UNICODE_STRING,
573 PLSA_REFERENCED_DOMAIN_LIST*,PLSA_TRANSLATED_SID*);
574 NTSTATUS NTAPI LsaLookupSids(LSA_HANDLE,ULONG,PSID*,
575 PLSA_REFERENCED_DOMAIN_LIST*,PLSA_TRANSLATED_NAME*);
576 ULONG NTAPI LsaNtStatusToWinError(NTSTATUS);
577 NTSTATUS NTAPI LsaOpenPolicy(PLSA_UNICODE_STRING,PLSA_OBJECT_ATTRIBUTES,
578 ACCESS_MASK,PLSA_HANDLE);
579 NTSTATUS NTAPI LsaQueryDomainInformationPolicy(LSA_HANDLE,
580 POLICY_DOMAIN_INFORMATION_CLASS,PVOID*);
581 NTSTATUS NTAPI LsaQueryInformationPolicy(LSA_HANDLE,POLICY_INFORMATION_CLASS,PVOID*);
582 NTSTATUS NTAPI LsaQueryLocalInformationPolicy(LSA_HANDLE,
583 POLICY_LOCAL_INFORMATION_CLASS,PVOID*);
584 NTSTATUS NTAPI LsaQueryTrustedDomainInfo(LSA_HANDLE,PSID,
585 TRUSTED_INFORMATION_CLASS,PVOID*);
586 NTSTATUS NTAPI LsaQueryTrustedDomainInfoByName(LSA_HANDLE,PLSA_UNICODE_STRING,
587 TRUSTED_INFORMATION_CLASS,PVOID*);
588 NTSTATUS NTAPI LsaRegisterLogonProcess(PLSA_STRING,PHANDLE,PLSA_OPERATIONAL_MODE);
589 NTSTATUS NTAPI LsaRemoveAccountRights(LSA_HANDLE,PSID,BOOLEAN,
590 PLSA_UNICODE_STRING,ULONG);
591 NTSTATUS NTAPI LsaRetrievePrivateData(LSA_HANDLE,PLSA_UNICODE_STRING,
592 PLSA_UNICODE_STRING*);
593 NTSTATUS NTAPI LsaSetDomainInformationPolicy(LSA_HANDLE,
594 POLICY_DOMAIN_INFORMATION_CLASS,PVOID);
595 NTSTATUS NTAPI LsaSetInformationPolicy(LSA_HANDLE,POLICY_INFORMATION_CLASS, PVOID);
596 NTSTATUS NTAPI LsaSetLocalInformationPolicy(LSA_HANDLE,
597 POLICY_LOCAL_INFORMATION_CLASS,PVOID);
598 NTSTATUS NTAPI LsaSetTrustedDomainInformation(LSA_HANDLE,PSID,
599 TRUSTED_INFORMATION_CLASS,PVOID);
600 NTSTATUS NTAPI LsaSetTrustedDomainInfoByName(LSA_HANDLE,PLSA_UNICODE_STRING,
601 TRUSTED_INFORMATION_CLASS,PVOID);
602 NTSTATUS NTAPI LsaStorePrivateData(LSA_HANDLE,PLSA_UNICODE_STRING,
603 PLSA_UNICODE_STRING);
604 typedef NTSTATUS (*PSAM_PASSWORD_NOTIFICATION_ROUTINE)(PUNICODE_STRING,
605 ULONG,PUNICODE_STRING);
606 typedef BOOLEAN (*PSAM_INIT_NOTIFICATION_ROUTINE)(void);
607 typedef BOOLEAN (*PSAM_PASSWORD_FILTER_ROUTINE)(PUNICODE_STRING,PUNICODE_STRING,
608 PUNICODE_STRING,BOOLEAN);
609 #ifdef __cplusplus
611 #endif
612 #endif /* _NTSECAPI_H */