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