source: Daodan/MinGW/include/ntsecapi.h@ 1165

Last change on this file since 1165 was 1046, checked in by alloc, 8 years ago

Daodan: Added Windows MinGW and build batch file

File size: 23.9 KB
Line 
1#ifndef _NTSECAPI_H
2#define _NTSECAPI_H
3#if __GNUC__ >=3
4#pragma GCC system_header
5#endif
6
7#ifdef __cplusplus
8extern "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)
126typedef LONG NTSTATUS, *PNTSTATUS;
127typedef struct _UNICODE_STRING {
128 USHORT Length;
129 USHORT MaximumLength;
130 PWSTR Buffer;
131} UNICODE_STRING, *PUNICODE_STRING;
132typedef const UNICODE_STRING* PCUNICODE_STRING;
133typedef struct _STRING {
134 USHORT Length;
135 USHORT MaximumLength;
136 PCHAR Buffer;
137} STRING, *PSTRING;
138#endif
139typedef UNICODE_STRING LSA_UNICODE_STRING, *PLSA_UNICODE_STRING;
140typedef STRING LSA_STRING, *PLSA_STRING;
141typedef 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;
148typedef 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;
153typedef enum {
154 MsvAvEOL,
155 MsvAvNbComputerName,
156 MsvAvNbDomainName,
157 MsvAvDnsComputerName,
158 MsvAvDnsDomainName
159} MSV1_0_AVID;
160typedef 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;
174typedef enum _POLICY_LSA_SERVER_ROLE {
175 PolicyServerRoleBackup = 2,
176 PolicyServerRolePrimary
177} POLICY_LSA_SERVER_ROLE, *PPOLICY_LSA_SERVER_ROLE;
178typedef enum _POLICY_SERVER_ENABLE_STATE {
179 PolicyServerEnabled = 2,
180 PolicyServerDisabled
181} POLICY_SERVER_ENABLE_STATE, *PPOLICY_SERVER_ENABLE_STATE;
182typedef 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;
197typedef 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;
208typedef 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;
223typedef 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;
232typedef enum _SECURITY_LOGON_TYPE {
233 Interactive = 2,
234 Network,
235 Batch,
236 Service,
237 Proxy,
238 Unlock
239} SECURITY_LOGON_TYPE, *PSECURITY_LOGON_TYPE;
240typedef 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;
250typedef 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;
257typedef ULONG LSA_ENUMERATION_HANDLE, *PLSA_ENUMERATION_HANDLE;
258typedef struct _LSA_ENUMERATION_INFORMATION {
259 PSID Sid;
260} LSA_ENUMERATION_INFORMATION, *PLSA_ENUMERATION_INFORMATION;
261typedef ULONG LSA_OPERATIONAL_MODE, *PLSA_OPERATIONAL_MODE;
262#if !defined(_NTDEF_H)
263typedef 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
272typedef OBJECT_ATTRIBUTES LSA_OBJECT_ATTRIBUTES, *PLSA_OBJECT_ATTRIBUTES;
273typedef struct _LSA_TRUST_INFORMATION {
274 LSA_UNICODE_STRING Name;
275 PSID Sid;
276} LSA_TRUST_INFORMATION, *PLSA_TRUST_INFORMATION;
277typedef struct _LSA_REFERENCED_DOMAIN_LIST {
278 ULONG Entries;
279 PLSA_TRUST_INFORMATION Domains;
280} LSA_REFERENCED_DOMAIN_LIST, *PLSA_REFERENCED_DOMAIN_LIST;
281typedef struct _LSA_TRANSLATED_SID {
282 SID_NAME_USE Use;
283 ULONG RelativeId;
284 LONG DomainIndex;
285} LSA_TRANSLATED_SID, *PLSA_TRANSLATED_SID;
286typedef struct _LSA_TRANSLATED_NAME {
287 SID_NAME_USE Use;
288 LSA_UNICODE_STRING Name;
289 LONG DomainIndex;
290} LSA_TRANSLATED_NAME, *PLSA_TRANSLATED_NAME;
291typedef 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;
297typedef 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;
315typedef 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;
325typedef 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;
336typedef 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;
347typedef 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;
353typedef 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;
364typedef struct _MSV1_0_AV_PAIR {
365 USHORT AvId;
366 USHORT AvLen;
367} MSV1_0_AV_PAIR, *PMSV1_0_AV_PAIR;
368typedef 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;
376typedef 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;
381typedef 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;
387typedef 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
393typedef 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;
400typedef 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;
405typedef ULONG POLICY_AUDIT_EVENT_OPTIONS, *PPOLICY_AUDIT_EVENT_OPTIONS;
406typedef struct _POLICY_PRIVILEGE_DEFINITION {
407 LSA_UNICODE_STRING Name;
408 LUID LocalValue;
409} POLICY_PRIVILEGE_DEFINITION, *PPOLICY_PRIVILEGE_DEFINITION;
410typedef 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;
418typedef 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;
423typedef struct _POLICY_ACCOUNT_DOMAIN_INFO {
424 LSA_UNICODE_STRING DomainName;
425 PSID DomainSid;
426} POLICY_ACCOUNT_DOMAIN_INFO, *PPOLICY_ACCOUNT_DOMAIN_INFO;
427typedef struct _POLICY_PRIMARY_DOMAIN_INFO {
428 LSA_UNICODE_STRING Name;
429 PSID Sid;
430} POLICY_PRIMARY_DOMAIN_INFO, *PPOLICY_PRIMARY_DOMAIN_INFO;
431typedef 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;
438typedef struct _POLICY_PD_ACCOUNT_INFO {
439 LSA_UNICODE_STRING Name;
440} POLICY_PD_ACCOUNT_INFO, *PPOLICY_PD_ACCOUNT_INFO;
441typedef struct _POLICY_LSA_SERVER_ROLE_INFO {
442 POLICY_LSA_SERVER_ROLE LsaServerRole;
443} POLICY_LSA_SERVER_ROLE_INFO, *PPOLICY_LSA_SERVER_ROLE_INFO;
444typedef struct _POLICY_REPLICA_SOURCE_INFO {
445 LSA_UNICODE_STRING ReplicaSource;
446 LSA_UNICODE_STRING ReplicaAccountName;
447} POLICY_REPLICA_SOURCE_INFO, *PPOLICY_REPLICA_SOURCE_INFO;
448typedef struct _POLICY_DEFAULT_QUOTA_INFO {
449 QUOTA_LIMITS QuotaLimits;
450} POLICY_DEFAULT_QUOTA_INFO, *PPOLICY_DEFAULT_QUOTA_INFO;
451typedef struct _POLICY_MODIFICATION_INFO {
452 LARGE_INTEGER ModifiedId;
453 LARGE_INTEGER DatabaseCreationTime;
454} POLICY_MODIFICATION_INFO, *PPOLICY_MODIFICATION_INFO;
455typedef struct _POLICY_AUDIT_FULL_SET_INFO {
456 BOOLEAN ShutDownOnFull;
457} POLICY_AUDIT_FULL_SET_INFO, *PPOLICY_AUDIT_FULL_SET_INFO;
458typedef struct _POLICY_AUDIT_FULL_QUERY_INFO {
459 BOOLEAN ShutDownOnFull;
460 BOOLEAN LogIsFull;
461} POLICY_AUDIT_FULL_QUERY_INFO, *PPOLICY_AUDIT_FULL_QUERY_INFO;
462typedef struct _POLICY_EFS_INFO {
463 ULONG InfoLength;
464 PUCHAR EfsBlob;
465} POLICY_EFS_INFO, *PPOLICY_EFS_INFO;
466typedef struct _POLICY_LOCAL_IPSEC_REFERENCE_INFO {
467 LSA_UNICODE_STRING ObjectPath;
468} POLICY_LOCAL_IPSEC_REFERENCE_INFO, *PPOLICY_LOCAL_IPSEC_REFERENCE_INFO;
469typedef struct _POLICY_LOCAL_MACHINE_PASSWORD_INFO {
470 LARGE_INTEGER PasswordChangeInterval;
471} POLICY_LOCAL_MACHINE_PASSWORD_INFO, *PPOLICY_LOCAL_MACHINE_PASSWORD_INFO;
472typedef struct _POLICY_LOCAL_POLICY_LOCATION_INFO {
473 ULONG PolicyLocation;
474} POLICY_LOCAL_POLICY_LOCATION_INFO, *PPOLICY_LOCAL_POLICY_LOCATION_INFO;
475typedef struct _POLICY_LOCAL_QUALITY_OF_SERVICE_INFO {
476 ULONG QualityOfService;
477} POLICY_LOCAL_QUALITY_OF_SERVICE_INFO, *PPOLICY_LOCAL_QUALITY_OF_SERVICE_INFO;
478typedef struct _POLICY_LOCAL_QUALITY_OF_SERVICE_INFO POLICY_DOMAIN_QUALITY_OF_SERVICE_INFO;
479typedef struct _POLICY_LOCAL_QUALITY_OF_SERVICE_INFO *PPOLICY_DOMAIN_QUALITY_OF_SERVICE_INFO;
480typedef struct _POLICY_DOMAIN_PUBLIC_KEY_INFO {
481 ULONG InfoLength;
482 PUCHAR PublicKeyInfo;
483} POLICY_DOMAIN_PUBLIC_KEY_INFO, *PPOLICY_DOMAIN_PUBLIC_KEY_INFO;
484typedef 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;
489typedef 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;
496typedef 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;
504typedef PVOID LSA_HANDLE, *PLSA_HANDLE;
505typedef struct _TRUSTED_DOMAIN_NAME_INFO {
506 LSA_UNICODE_STRING Name;
507} TRUSTED_DOMAIN_NAME_INFO, *PTRUSTED_DOMAIN_NAME_INFO;
508typedef struct _TRUSTED_CONTROLLERS_INFO {
509 ULONG Entries;
510 PLSA_UNICODE_STRING Names;
511} TRUSTED_CONTROLLERS_INFO, *PTRUSTED_CONTROLLERS_INFO;
512typedef struct _TRUSTED_POSIX_OFFSET_INFO {
513 ULONG Offset;
514} TRUSTED_POSIX_OFFSET_INFO, *PTRUSTED_POSIX_OFFSET_INFO;
515typedef struct _TRUSTED_PASSWORD_INFO {
516 LSA_UNICODE_STRING Password;
517 LSA_UNICODE_STRING OldPassword;
518} TRUSTED_PASSWORD_INFO, *PTRUSTED_PASSWORD_INFO;
519typedef LSA_TRUST_INFORMATION TRUSTED_DOMAIN_INFORMATION_BASIC;
520typedef PLSA_TRUST_INFORMATION *PTRUSTED_DOMAIN_INFORMATION_BASIC;
521typedef 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;
529typedef struct _LSA_AUTH_INFORMATION {
530 LARGE_INTEGER LastUpdateTime;
531 ULONG AuthType;
532 ULONG AuthInfoLength;
533 PUCHAR AuthInfo;
534} LSA_AUTH_INFORMATION, *PLSA_AUTH_INFORMATION;
535typedef 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;
543typedef 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;
548NTSTATUS NTAPI LsaAddAccountRights(LSA_HANDLE,PSID,PLSA_UNICODE_STRING,ULONG);
549NTSTATUS NTAPI LsaCallAuthenticationPackage(HANDLE,ULONG,PVOID,ULONG,PVOID*,
550 PULONG,PNTSTATUS);
551NTSTATUS NTAPI LsaClose(LSA_HANDLE);
552NTSTATUS NTAPI LsaConnectUntrusted(PHANDLE);
553NTSTATUS NTAPI LsaCreateTrustedDomainEx(LSA_HANDLE,
554 PTRUSTED_DOMAIN_INFORMATION_EX,
555 PTRUSTED_DOMAIN_AUTH_INFORMATION,ACCESS_MASK,
556 PLSA_HANDLE);
557NTSTATUS NTAPI LsaDeleteTrustedDomain(LSA_HANDLE,PSID);
558NTSTATUS NTAPI LsaDeregisterLogonProcess(HANDLE);
559NTSTATUS NTAPI LsaEnumerateAccountRights(LSA_HANDLE,PSID,PLSA_UNICODE_STRING*,PULONG);
560NTSTATUS NTAPI LsaEnumerateAccountsWithUserRight(LSA_HANDLE,PLSA_UNICODE_STRING,
561 PVOID*,PULONG);
562NTSTATUS NTAPI LsaEnumerateTrustedDomains(LSA_HANDLE,PLSA_ENUMERATION_HANDLE,
563 PVOID*,ULONG,PULONG);
564NTSTATUS NTAPI LsaEnumerateTrustedDomainsEx(LSA_HANDLE,PLSA_ENUMERATION_HANDLE,
565 TRUSTED_INFORMATION_CLASS,PVOID*,ULONG,PULONG);
566NTSTATUS NTAPI LsaFreeMemory(PVOID);
567NTSTATUS NTAPI LsaFreeReturnBuffer(PVOID);
568NTSTATUS NTAPI LsaLogonUser(HANDLE,PLSA_STRING,SECURITY_LOGON_TYPE,ULONG,PVOID,
569 ULONG,PTOKEN_GROUPS,PTOKEN_SOURCE,PVOID*,PULONG,
570 PLUID,PHANDLE,PQUOTA_LIMITS,PNTSTATUS);
571NTSTATUS NTAPI LsaLookupAuthenticationPackage(HANDLE,PLSA_STRING,PULONG);
572NTSTATUS NTAPI LsaLookupNames(LSA_HANDLE,ULONG,PLSA_UNICODE_STRING,
573 PLSA_REFERENCED_DOMAIN_LIST*,PLSA_TRANSLATED_SID*);
574NTSTATUS NTAPI LsaLookupSids(LSA_HANDLE,ULONG,PSID*,
575 PLSA_REFERENCED_DOMAIN_LIST*,PLSA_TRANSLATED_NAME*);
576ULONG NTAPI LsaNtStatusToWinError(NTSTATUS);
577NTSTATUS NTAPI LsaOpenPolicy(PLSA_UNICODE_STRING,PLSA_OBJECT_ATTRIBUTES,
578 ACCESS_MASK,PLSA_HANDLE);
579NTSTATUS NTAPI LsaQueryDomainInformationPolicy(LSA_HANDLE,
580 POLICY_DOMAIN_INFORMATION_CLASS,PVOID*);
581NTSTATUS NTAPI LsaQueryInformationPolicy(LSA_HANDLE,POLICY_INFORMATION_CLASS,PVOID*);
582NTSTATUS NTAPI LsaQueryLocalInformationPolicy(LSA_HANDLE,
583 POLICY_LOCAL_INFORMATION_CLASS,PVOID*);
584NTSTATUS NTAPI LsaQueryTrustedDomainInfo(LSA_HANDLE,PSID,
585 TRUSTED_INFORMATION_CLASS,PVOID*);
586NTSTATUS NTAPI LsaQueryTrustedDomainInfoByName(LSA_HANDLE,PLSA_UNICODE_STRING,
587 TRUSTED_INFORMATION_CLASS,PVOID*);
588NTSTATUS NTAPI LsaRegisterLogonProcess(PLSA_STRING,PHANDLE,PLSA_OPERATIONAL_MODE);
589NTSTATUS NTAPI LsaRemoveAccountRights(LSA_HANDLE,PSID,BOOLEAN,
590 PLSA_UNICODE_STRING,ULONG);
591NTSTATUS NTAPI LsaRetrievePrivateData(LSA_HANDLE,PLSA_UNICODE_STRING,
592 PLSA_UNICODE_STRING*);
593NTSTATUS NTAPI LsaSetDomainInformationPolicy(LSA_HANDLE,
594 POLICY_DOMAIN_INFORMATION_CLASS,PVOID);
595NTSTATUS NTAPI LsaSetInformationPolicy(LSA_HANDLE,POLICY_INFORMATION_CLASS, PVOID);
596NTSTATUS NTAPI LsaSetLocalInformationPolicy(LSA_HANDLE,
597 POLICY_LOCAL_INFORMATION_CLASS,PVOID);
598NTSTATUS NTAPI LsaSetTrustedDomainInformation(LSA_HANDLE,PSID,
599 TRUSTED_INFORMATION_CLASS,PVOID);
600NTSTATUS NTAPI LsaSetTrustedDomainInfoByName(LSA_HANDLE,PLSA_UNICODE_STRING,
601 TRUSTED_INFORMATION_CLASS,PVOID);
602NTSTATUS NTAPI LsaStorePrivateData(LSA_HANDLE,PLSA_UNICODE_STRING,
603 PLSA_UNICODE_STRING);
604typedef NTSTATUS (*PSAM_PASSWORD_NOTIFICATION_ROUTINE)(PUNICODE_STRING,
605 ULONG,PUNICODE_STRING);
606typedef BOOLEAN (*PSAM_INIT_NOTIFICATION_ROUTINE)(void);
607typedef BOOLEAN (*PSAM_PASSWORD_FILTER_ROUTINE)(PUNICODE_STRING,PUNICODE_STRING,
608 PUNICODE_STRING,BOOLEAN);
609#ifdef __cplusplus
610}
611#endif
612#endif /* _NTSECAPI_H */
Note: See TracBrowser for help on using the repository browser.