xref: /reactos/sdk/include/psdk/ntsecapi.h (revision cc439606)
1 #ifndef _NTSECAPI_H
2 #define _NTSECAPI_H
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 #define KERB_WRAP_NO_ENCRYPT 0x80000001
8 #define LOGON_GUEST 1
9 #define LOGON_NOENCRYPTION 2
10 #define LOGON_CACHED_ACCOUNT 4
11 #define LOGON_USED_LM_PASSWORD 8
12 #define LOGON_EXTRA_SIDS 32
13 #define LOGON_SUBAUTH_SESSION_KEY 64
14 #define LOGON_SERVER_TRUST_ACCOUNT 128
15 #define LOGON_NTLMV2_ENABLED 256
16 #define LOGON_RESOURCE_GROUPS 512
17 #define LOGON_PROFILE_PATH_RETURNED 1024
18 #define LOGON_GRACE_LOGON 16777216
19 #define LSA_MODE_PASSWORD_PROTECTED 1
20 #define LSA_MODE_INDIVIDUAL_ACCOUNTS 2
21 #define LSA_MODE_MANDATORY_ACCESS 3
22 #define LSA_MODE_LOG_FULL 4
23 #define LSA_SUCCESS(x) ((LONG)(x)>=0)
24 #define MICROSOFT_KERBEROS_NAME_A "Kerberos"
25 #define MICROSOFT_KERBEROS_NAME_W L"Kerberos"
26 #define MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT 32
27 #define MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT 2048
28 #define MSV1_0_CHALLENGE_LENGTH 8
29 #define MSV1_0_CLEARTEXT_PASSWORD_ALLOWED 2
30 #define MSV1_0_CRED_LM_PRESENT 1
31 #define MSV1_0_CRED_NT_PRESENT 2
32 #define MSV1_0_CRED_VERSION 0
33 #define MSV1_0_DONT_TRY_GUEST_ACCOUNT 16
34 #define MSV1_0_LANMAN_SESSION_KEY_LENGTH 8
35 #define MSV1_0_MAX_NTLM3_LIFE 1800
36 #define MSV1_0_MAX_AVL_SIZE 64000
37 #define MSV1_0_MNS_LOGON 16777216
38 #define MSV1_0_NTLM3_RESPONSE_LENGTH 16
39 #define MSV1_0_NTLM3_OWF_LENGTH 16
40 #define MSV1_0_NTLM3_INPUT_LENGTH (sizeof(MSV1_0_NTLM3_RESPONSE)-MSV1_0_NTLM3_RESPONSE_LENGTH)
41 #define MSV1_0_OWF_PASSWORD_LENGTH 16
42 #define MSV1_0_PACKAGE_NAME "MICROSOFT_AUTHENTICATION_PACKAGE_V1_0"
43 #define MSV1_0_PACKAGE_NAMEW L"MICROSOFT_AUTHENTICATION_PACKAGE_V1_0"
44 #define MSV1_0_PACKAGE_NAMEW_LENGTH sizeof(MSV1_0_PACKAGE_NAMEW)-sizeof(WCHAR)
45 #define MSV1_0_RETURN_USER_PARAMETERS 8
46 #define MSV1_0_RETURN_PASSWORD_EXPIRY 64
47 #define MSV1_0_RETURN_PROFILE_PATH 512
48 #define MSV1_0_SUBAUTHENTICATION_DLL_EX 1048576
49 #define MSV1_0_SUBAUTHENTICATION_DLL 0xff000000
50 #define MSV1_0_SUBAUTHENTICATION_DLL_SHIFT 24
51 #define MSV1_0_SUBAUTHENTICATION_DLL_RAS 2
52 #define MSV1_0_SUBAUTHENTICATION_DLL_IIS 132
53 #define MSV1_0_SUBAUTHENTICATION_FLAGS 0xff000000
54 #define MSV1_0_SUBAUTHENTICATION_KEY "System\\CurrentControlSet\\Control\\Lsa\\MSV1_0"
55 #define MSV1_0_SUBAUTHENTICATION_VALUE "Auth"
56 #define MSV1_0_TRY_GUEST_ACCOUNT_ONLY 256
57 #define MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY 1024
58 #define MSV1_0_UPDATE_LOGON_STATISTICS 4
59 #define MSV1_0_USE_CLIENT_CHALLENGE 128
60 #define MSV1_0_USER_SESSION_KEY_LENGTH 16
61 #define POLICY_VIEW_LOCAL_INFORMATION 1
62 #define POLICY_VIEW_AUDIT_INFORMATION 2
63 #define POLICY_GET_PRIVATE_INFORMATION 4
64 #define POLICY_TRUST_ADMIN 8
65 #define POLICY_CREATE_ACCOUNT 16
66 #define POLICY_CREATE_SECRET 32
67 #define POLICY_CREATE_PRIVILEGE 64
68 #define POLICY_SET_DEFAULT_QUOTA_LIMITS 128
69 #define POLICY_SET_AUDIT_REQUIREMENTS 256
70 #define POLICY_AUDIT_LOG_ADMIN 512
71 #define POLICY_SERVER_ADMIN 1024
72 #define POLICY_LOOKUP_NAMES 2048
73 #define POLICY_NOTIFICATION 4096
74 #define POLICY_READ (STANDARD_RIGHTS_READ|6)
75 #define POLICY_WRITE (STANDARD_RIGHTS_WRITE|2040)
76 #define POLICY_EXECUTE (STANDARD_RIGHTS_EXECUTE|2049)
77 #define POLICY_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|4095)
78 #define POLICY_AUDIT_EVENT_UNCHANGED 0
79 #define POLICY_AUDIT_EVENT_SUCCESS 1
80 #define POLICY_AUDIT_EVENT_FAILURE 2
81 #define POLICY_AUDIT_EVENT_NONE 4
82 #define POLICY_AUDIT_EVENT_MASK 7
83 #define POLICY_LOCATION_LOCAL 1
84 #define POLICY_LOCATION_DS 2
85 #define POLICY_MACHINE_POLICY_LOCAL 0
86 #define POLICY_MACHINE_POLICY_DEFAULTED 1
87 #define POLICY_MACHINE_POLICY_EXPLICIT 2
88 #define POLICY_MACHINE_POLICY_UNKNOWN 0xFFFFFFFF
89 #define POLICY_QOS_SCHANEL_REQUIRED 1
90 #define POLICY_QOS_OUTBOUND_INTEGRITY 2
91 #define POLICY_QOS_OUTBOUND_CONFIDENTIALITY 4
92 #define POLICY_QOS_INBOUND_INTEGREITY 8
93 #define POLICY_QOS_INBOUND_CONFIDENTIALITY 16
94 #define POLICY_QOS_ALLOW_LOCAL_ROOT_CERT_STORE 32
95 #define POLICY_QOS_RAS_SERVER_ALLOWED 64
96 #define POLICY_QOS_DHCP_SERVER_ALLOWD 128
97 #define POLICY_KERBEROS_FORWARDABLE 1
98 #define POLICY_KERBEROS_PROXYABLE 2
99 #define POLICY_KERBEROS_RENEWABLE 4
100 #define POLICY_KERBEROS_POSTDATEABLE 8
101 #define SAM_PASSWORD_CHANGE_NOTIFY_ROUTINE "PasswordChangeNotify"
102 #define SAM_INIT_NOTIFICATION_ROUTINE "InitializeChangeNotify"
103 #define SAM_PASSWORD_FILTER_ROUTINE "PasswordFilter"
104 #define SE_INTERACTIVE_LOGON_NAME TEXT("SeInteractiveLogonRight")
105 #define SE_NETWORK_LOGON_NAME TEXT("SeNetworkLogonRight")
106 #define SE_BATCH_LOGON_NAME TEXT("SeBatchLogonRight")
107 #define SE_SERVICE_LOGON_NAME TEXT("SeServiceLogonRight")
108 #define SE_DENY_INTERACTIVE_LOGON_NAME TEXT("SeDenyInteractiveLogonRight")
109 #define SE_DENY_NETWORK_LOGON_NAME TEXT("SeDenyNetworkLogonRight")
110 #define SE_DENY_BATCH_LOGON_NAME TEXT("SeDenyBatchLogonRight")
111 #define SE_DENY_SERVICE_LOGON_NAME TEXT("SeDenyServiceLogonRight")
112 #define SE_REMOTE_INTERACTIVE_LOGON_NAME TEXT("SeRemoteInteractiveLogonRight")
113 #define SE_DENY_REMOTE_INTERACTIVE_LOGON_NAME TEXT("SeDenyRemoteInteractiveLogonRight")
114 #define TRUST_ATTRIBUTE_NON_TRANSITIVE 1
115 #define TRUST_ATTRIBUTE_UPLEVEL_ONLY 2
116 #define TRUST_ATTRIBUTE_TREE_PARENT 4194304
117 #define TRUST_ATTRIBUTES_VALID  -16580609
118 #define TRUST_AUTH_TYPE_NONE 0
119 #define TRUST_AUTH_TYPE_NT4OWF 1
120 #define TRUST_AUTH_TYPE_CLEAR 2
121 #define TRUST_DIRECTION_DISABLED 0
122 #define TRUST_DIRECTION_INBOUND 1
123 #define TRUST_DIRECTION_OUTBOUND 2
124 #define TRUST_DIRECTION_BIDIRECTIONAL 3
125 #define TRUST_TYPE_DOWNLEVEL 1
126 #define TRUST_TYPE_UPLEVEL 2
127 #define TRUST_TYPE_MIT 3
128 #define TRUST_TYPE_DCE 4
129 
130 #define SCESTATUS_SUCCESS             0L
131 #define SCESTATUS_INVALID_PARAMETER   1L
132 #define SCESTATUS_RECORD_NOT_FOUND    2L
133 #define SCESTATUS_INVALID_DATA        3L
134 #define SCESTATUS_OBJECT_EXISTS       4L
135 #define SCESTATUS_BUFFER_TOO_SMALL    5L
136 #define SCESTATUS_PROFILE_NOT_FOUND   6L
137 #define SCESTATUS_BAD_FORMAT          7L
138 #define SCESTATUS_NOT_ENOUGH_RESOURCE 8L
139 #define SCESTATUS_ACCESS_DENIED       9L
140 #define SCESTATUS_CANT_DELETE         10L
141 #define SCESTATUS_PREFIX_OVERFLOW     11L
142 #define SCESTATUS_OTHER_ERROR         12L
143 #define SCESTATUS_ALREADY_RUNNING     13L
144 #define SCESTATUS_SERVICE_NOT_SUPPORT 14L
145 #define SCESTATUS_MOD_NOT_FOUND       15L
146 #define SCESTATUS_EXCEPTION_IN_SERVER 16L
147 #define SCESTATUS_NO_TEMPLATE_GIVEN   17L
148 #define SCESTATUS_NO_MAPPING          18L
149 #define SCESTATUS_TRUST_FAIL          19L
150 
151 #if !defined(_NTDEF_) && !defined(__WINE_WINTERNL_H)
152 typedef LONG NTSTATUS, *PNTSTATUS;
153 #endif
154 
155 #if defined (_NTDEF_) || defined(__WINE_WINTERNL_H)
156 typedef UNICODE_STRING LSA_UNICODE_STRING, *PLSA_UNICODE_STRING;
157 typedef STRING LSA_STRING, *PLSA_STRING;
158 typedef OBJECT_ATTRIBUTES LSA_OBJECT_ATTRIBUTES, *PLSA_OBJECT_ATTRIBUTES;
159 
160 #else
161 
162 typedef struct _LSA_UNICODE_STRING {
163   USHORT Length;
164   USHORT MaximumLength;
165 #ifdef MIDL_PASS
166   [size_is(MaximumLength / 2), length_is(Length / 2)]
167 #endif
168   PWSTR  Buffer;
169 } LSA_UNICODE_STRING, *PLSA_UNICODE_STRING;
170 
171 typedef struct _LSA_STRING {
172   USHORT Length;
173   USHORT MaximumLength;
174   PCHAR Buffer;
175 } LSA_STRING, *PLSA_STRING;
176 
177 typedef struct _LSA_OBJECT_ATTRIBUTES {
178   ULONG Length;
179   HANDLE RootDirectory;
180   PLSA_UNICODE_STRING ObjectName;
181   ULONG Attributes;
182   PVOID SecurityDescriptor;
183   PVOID SecurityQualityOfService;
184 } LSA_OBJECT_ATTRIBUTES, *PLSA_OBJECT_ATTRIBUTES;
185 
186 typedef LSA_UNICODE_STRING UNICODE_STRING, *PUNICODE_STRING;
187 typedef LSA_STRING STRING, *PSTRING ;
188 
189 #endif
190 
191 typedef enum _KERB_LOGON_SUBMIT_TYPE
192 {
193   KerbInteractiveLogon = 2,
194   KerbS4ULogon = 12,
195   KerbTicketLogon = 10,
196   KerbTicketUnlockLogon = 11
197 } KERB_LOGON_SUBMIT_TYPE, *PKERB_LOGON_SUBMIT_TYPE;
198 typedef enum _MSV1_0_LOGON_SUBMIT_TYPE {
199   MsV1_0InteractiveLogon = 2,
200   MsV1_0Lm20Logon,
201   MsV1_0NetworkLogon,
202   MsV1_0SubAuthLogon,
203   MsV1_0WorkstationUnlockLogon = 7
204 } MSV1_0_LOGON_SUBMIT_TYPE, *PMSV1_0_LOGON_SUBMIT_TYPE;
205 typedef enum _MSV1_0_PROFILE_BUFFER_TYPE {
206   MsV1_0InteractiveProfile = 2,
207   MsV1_0Lm20LogonProfile,
208   MsV1_0SmartCardProfile
209 } MSV1_0_PROFILE_BUFFER_TYPE, *PMSV1_0_PROFILE_BUFFER_TYPE;
210 typedef enum {
211   MsvAvEOL,
212   MsvAvNbComputerName,
213   MsvAvNbDomainName,
214   MsvAvDnsComputerName,
215   MsvAvDnsDomainName
216 } MSV1_0_AVID;
217 typedef enum _MSV1_0_PROTOCOL_MESSAGE_TYPE {
218   MsV1_0Lm20ChallengeRequest = 0,
219   MsV1_0Lm20GetChallengeResponse,
220   MsV1_0EnumerateUsers,
221   MsV1_0GetUserInfo,
222   MsV1_0ReLogonUsers,
223   MsV1_0ChangePassword,
224   MsV1_0ChangeCachedPassword,
225   MsV1_0GenericPassthrough,
226   MsV1_0CacheLogon,
227   MsV1_0SubAuth,
228   MsV1_0DeriveCredential,
229   MsV1_0CacheLookup
230 } MSV1_0_PROTOCOL_MESSAGE_TYPE, *PMSV1_0_PROTOCOL_MESSAGE_TYPE;
231 typedef enum _POLICY_LSA_SERVER_ROLE {
232   PolicyServerRoleBackup = 2,
233   PolicyServerRolePrimary
234 } POLICY_LSA_SERVER_ROLE, *PPOLICY_LSA_SERVER_ROLE;
235 typedef enum _POLICY_SERVER_ENABLE_STATE {
236   PolicyServerEnabled = 2,
237   PolicyServerDisabled
238 } POLICY_SERVER_ENABLE_STATE, *PPOLICY_SERVER_ENABLE_STATE;
239 typedef enum _POLICY_INFORMATION_CLASS {
240   PolicyAuditLogInformation = 1,
241   PolicyAuditEventsInformation,
242   PolicyPrimaryDomainInformation,
243   PolicyPdAccountInformation,
244   PolicyAccountDomainInformation,
245   PolicyLsaServerRoleInformation,
246   PolicyReplicaSourceInformation,
247   PolicyDefaultQuotaInformation,
248   PolicyModificationInformation,
249   PolicyAuditFullSetInformation,
250   PolicyAuditFullQueryInformation,
251   PolicyDnsDomainInformation,
252   PolicyDnsDomainInformationInt,
253   PolicyLocalAccountDomainInformation,
254   PolicyLastEntry
255 } POLICY_INFORMATION_CLASS, *PPOLICY_INFORMATION_CLASS;
256 typedef enum _POLICY_AUDIT_EVENT_TYPE {
257   AuditCategorySystem,
258   AuditCategoryLogon,
259   AuditCategoryObjectAccess,
260   AuditCategoryPrivilegeUse,
261   AuditCategoryDetailedTracking,
262   AuditCategoryPolicyChange,
263   AuditCategoryAccountManagement,
264   AuditCategoryDirectoryServiceAccess,
265   AuditCategoryAccountLogon
266 } POLICY_AUDIT_EVENT_TYPE, *PPOLICY_AUDIT_EVENT_TYPE;
267 typedef enum _POLICY_DOMAIN_INFORMATION_CLASS {
268   PolicyDomainIPSecReferenceInformation = 1,
269   PolicyDomainQualityOfServiceInformation,
270   PolicyDomainEfsInformation,
271   PolicyDomainPublicKeyInformation,
272   PolicyDomainPasswordPolicyInformation,
273   PolicyDomainLockoutInformation,
274   PolicyDomainKerberosTicketInformation
275 } POLICY_DOMAIN_INFORMATION_CLASS, *PPOLICY_DOMAIN_INFORMATION_CLASS;
276 typedef enum _POLICY_NOTIFICATION_INFORMATION_CLASS {
277   PolicyNotifyAuditEventsInformation = 1,
278   PolicyNotifyAccountDomainInformation,
279   PolicyNotifyServerRoleInformation,
280   PolicyNotifyDnsDomainInformation,
281   PolicyNotifyDomainEfsInformation,
282   PolicyNotifyDomainKerberosTicketInformation,
283   PolicyNotifyMachineAccountPasswordInformation
284 } POLICY_NOTIFICATION_INFORMATION_CLASS, *PPOLICY_NOTIFICATION_INFORMATION_CLASS;
285 typedef enum _SECURITY_LOGON_TYPE {
286   Interactive = 2,
287   Network,
288   Batch,
289   Service,
290   Proxy,
291   Unlock
292 } SECURITY_LOGON_TYPE, *PSECURITY_LOGON_TYPE;
293 #if (_WIN32_WINNT >= 0x0600)
294 typedef struct _LSA_LAST_INTER_LOGON_INFO {
295   LARGE_INTEGER LastSuccessfulLogon;
296   LARGE_INTEGER LastFailedLogon;
297   ULONG FailedAttemptCountSinceLastSuccessfulLogon;
298 } LSA_LAST_INTER_LOGON_INFO, *PLSA_LAST_INTER_LOGON_INFO;
299 #endif
300 typedef struct _SECURITY_LOGON_SESSION_DATA {
301   ULONG Size;
302   LUID LogonId;
303   LSA_UNICODE_STRING UserName;
304   LSA_UNICODE_STRING LogonDomain;
305   LSA_UNICODE_STRING AuthenticationPackage;
306   ULONG LogonType;
307   ULONG Session;
308   PSID Sid;
309   LARGE_INTEGER LogonTime;
310   LSA_UNICODE_STRING LogonServer;
311   LSA_UNICODE_STRING DnsDomainName;
312   LSA_UNICODE_STRING Upn;
313 #if (_WIN32_WINNT >= 0x0600)
314   ULONG UserFlags;
315   LSA_LAST_INTER_LOGON_INFO LastLogonInfo;
316   LSA_UNICODE_STRING LogonScript;
317   LSA_UNICODE_STRING ProfilePath;
318   LSA_UNICODE_STRING HomeDirectory;
319   LSA_UNICODE_STRING HomeDirectoryDrive;
320   LARGE_INTEGER LogoffTime;
321   LARGE_INTEGER KickOffTime;
322   LARGE_INTEGER PasswordLastSet;
323   LARGE_INTEGER PasswordCanChange;
324   LARGE_INTEGER PasswordMustChange;
325 #endif
326 } SECURITY_LOGON_SESSION_DATA, *PSECURITY_LOGON_SESSION_DATA;
327 typedef enum _TRUSTED_INFORMATION_CLASS {
328   TrustedDomainNameInformation = 1,
329   TrustedControllersInformation,
330   TrustedPosixOffsetInformation,
331   TrustedPasswordInformation,
332   TrustedDomainInformationBasic,
333   TrustedDomainInformationEx,
334   TrustedDomainAuthInformation,
335   TrustedDomainFullInformation,
336   TrustedDomainAuthInformationInternal,
337   TrustedDomainFullInformationInternal
338 } TRUSTED_INFORMATION_CLASS, *PTRUSTED_INFORMATION_CLASS;
339 typedef enum _LSA_FOREST_TRUST_RECORD_TYPE {
340   ForestTrustTopLevelName,
341   ForestTrustTopLevelNameEx,
342   ForestTrustDomainInfo,
343   ForestTrustRecordTypeLast = ForestTrustDomainInfo
344 } LSA_FOREST_TRUST_RECORD_TYPE;
345 typedef enum _LSA_FOREST_TRUST_COLLISION_RECORD_TYPE {
346   CollisionTdo,
347   CollisionXref,
348   CollisionOther
349 } LSA_FOREST_TRUST_COLLISION_RECORD_TYPE;
350 #ifndef _DOMAIN_PASSWORD_INFORMATION_DEFINED
351 #define _DOMAIN_PASSWORD_INFORMATION_DEFINED
352 typedef struct _DOMAIN_PASSWORD_INFORMATION {
353   USHORT MinPasswordLength;
354   USHORT PasswordHistoryLength;
355   ULONG PasswordProperties;
356   LARGE_INTEGER MaxPasswordAge;
357   LARGE_INTEGER MinPasswordAge;
358 } DOMAIN_PASSWORD_INFORMATION, *PDOMAIN_PASSWORD_INFORMATION;
359 #endif
360 typedef ULONG LSA_ENUMERATION_HANDLE, *PLSA_ENUMERATION_HANDLE;
361 typedef struct _LSA_ENUMERATION_INFORMATION {
362   PSID Sid;
363 } LSA_ENUMERATION_INFORMATION, *PLSA_ENUMERATION_INFORMATION;
364 typedef ULONG LSA_OPERATIONAL_MODE, *PLSA_OPERATIONAL_MODE;
365 
366 typedef struct _LSA_FOREST_TRUST_DOMAIN_INFO {
367   PSID Sid;
368   LSA_UNICODE_STRING DnsName;
369   LSA_UNICODE_STRING NetbiosName;
370 } LSA_FOREST_TRUST_DOMAIN_INFO, *PLSA_FOREST_TRUST_DOMAIN_INFO;
371 typedef struct _LSA_FOREST_TRUST_BINARY_DATA {
372   ULONG Length;
373   PUCHAR Buffer;
374 } LSA_FOREST_TRUST_BINARY_DATA, *PLSA_FOREST_TRUST_BINARY_DATA;
375 typedef struct _LSA_FOREST_TRUST_RECORD {
376   ULONG Flags;
377   LSA_FOREST_TRUST_RECORD_TYPE ForestTrustType;
378   LARGE_INTEGER Time;
379   union {
380     LSA_UNICODE_STRING TopLevelName;
381     LSA_FOREST_TRUST_DOMAIN_INFO DomainInfo;
382     LSA_FOREST_TRUST_BINARY_DATA Data;
383   } ForestTrustData;
384 } LSA_FOREST_TRUST_RECORD, *PLSA_FOREST_TRUST_RECORD;
385 typedef struct _LSA_FOREST_TRUST_INFORMATION {
386   ULONG RecordCount;
387   PLSA_FOREST_TRUST_RECORD *Entries;
388 } LSA_FOREST_TRUST_INFORMATION, *PLSA_FOREST_TRUST_INFORMATION;
389 typedef struct _LSA_FOREST_TRUST_COLLISION_RECORD {
390   ULONG Index;
391   LSA_FOREST_TRUST_COLLISION_RECORD_TYPE Type;
392   ULONG Flags;
393   LSA_UNICODE_STRING Name;
394 } LSA_FOREST_TRUST_COLLISION_RECORD, *PLSA_FOREST_TRUST_COLLISION_RECORD;
395 typedef struct _LSA_FOREST_TRUST_COLLISION_INFORMATION {
396   ULONG RecordCount;
397   PLSA_FOREST_TRUST_COLLISION_RECORD *Entries;
398 } LSA_FOREST_TRUST_COLLISION_INFORMATION, *PLSA_FOREST_TRUST_COLLISION_INFORMATION;
399 typedef struct _LSA_TRUST_INFORMATION {
400   LSA_UNICODE_STRING Name;
401   PSID Sid;
402 } LSA_TRUST_INFORMATION, *PLSA_TRUST_INFORMATION;
403 typedef struct _LSA_REFERENCED_DOMAIN_LIST {
404   ULONG Entries;
405   PLSA_TRUST_INFORMATION Domains;
406 } LSA_REFERENCED_DOMAIN_LIST, *PLSA_REFERENCED_DOMAIN_LIST;
407 typedef struct _LSA_TRANSLATED_SID {
408   SID_NAME_USE Use;
409   ULONG RelativeId;
410   LONG DomainIndex;
411 } LSA_TRANSLATED_SID, *PLSA_TRANSLATED_SID;
412 typedef struct _LSA_TRANSLATED_SID2 {
413   SID_NAME_USE Use;
414   PSID Sid;
415   LONG DomainIndex;
416   ULONG Flags;
417 } LSA_TRANSLATED_SID2, *PLSA_TRANSLATED_SID2;
418 typedef struct _LSA_TRANSLATED_NAME {
419   SID_NAME_USE Use;
420   LSA_UNICODE_STRING Name;
421   LONG DomainIndex;
422 } LSA_TRANSLATED_NAME, *PLSA_TRANSLATED_NAME;
423 
424 typedef struct _KERB_INTERACTIVE_LOGON {
425   KERB_LOGON_SUBMIT_TYPE MessageType;
426   UNICODE_STRING LogonDomainName;
427   UNICODE_STRING UserName;
428   UNICODE_STRING Password;
429 } KERB_INTERACTIVE_LOGON, *PKERB_INTERACTIVE_LOGON;
430 typedef struct _MSV1_0_INTERACTIVE_LOGON {
431   MSV1_0_LOGON_SUBMIT_TYPE MessageType;
432   UNICODE_STRING LogonDomainName;
433   UNICODE_STRING UserName;
434   UNICODE_STRING Password;
435 } MSV1_0_INTERACTIVE_LOGON, *PMSV1_0_INTERACTIVE_LOGON;
436 typedef struct _MSV1_0_INTERACTIVE_PROFILE {
437   MSV1_0_PROFILE_BUFFER_TYPE MessageType;
438   USHORT LogonCount;
439   USHORT BadPasswordCount;
440   LARGE_INTEGER LogonTime;
441   LARGE_INTEGER LogoffTime;
442   LARGE_INTEGER KickOffTime;
443   LARGE_INTEGER PasswordLastSet;
444   LARGE_INTEGER PasswordCanChange;
445   LARGE_INTEGER PasswordMustChange;
446   UNICODE_STRING LogonScript;
447   UNICODE_STRING HomeDirectory;
448   UNICODE_STRING FullName;
449   UNICODE_STRING ProfilePath;
450   UNICODE_STRING HomeDirectoryDrive;
451   UNICODE_STRING LogonServer;
452   ULONG UserFlags;
453 } MSV1_0_INTERACTIVE_PROFILE, *PMSV1_0_INTERACTIVE_PROFILE;
454 typedef struct _MSV1_0_LM20_LOGON {
455   MSV1_0_LOGON_SUBMIT_TYPE MessageType;
456   UNICODE_STRING LogonDomainName;
457   UNICODE_STRING UserName;
458   UNICODE_STRING Workstation;
459   UCHAR ChallengeToClient[MSV1_0_CHALLENGE_LENGTH];
460   STRING CaseSensitiveChallengeResponse;
461   STRING CaseInsensitiveChallengeResponse;
462   ULONG ParameterControl;
463 } MSV1_0_LM20_LOGON, * PMSV1_0_LM20_LOGON;
464 typedef struct _MSV1_0_SUBAUTH_LOGON{ /* W2K only */
465   MSV1_0_LOGON_SUBMIT_TYPE MessageType;
466   UNICODE_STRING LogonDomainName;
467   UNICODE_STRING UserName;
468   UNICODE_STRING Workstation;
469   UCHAR ChallengeToClient[MSV1_0_CHALLENGE_LENGTH];
470   STRING AuthenticationInfo1;
471   STRING AuthenticationInfo2;
472   ULONG ParameterControl;
473   ULONG SubAuthPackageId;
474 } MSV1_0_SUBAUTH_LOGON, * PMSV1_0_SUBAUTH_LOGON;
475 typedef struct _MSV1_0_LM20_LOGON_PROFILE {
476   MSV1_0_PROFILE_BUFFER_TYPE MessageType;
477   LARGE_INTEGER KickOffTime;
478   LARGE_INTEGER LogoffTime;
479   ULONG UserFlags;
480   UCHAR UserSessionKey[MSV1_0_USER_SESSION_KEY_LENGTH];
481   UNICODE_STRING LogonDomainName;
482   UCHAR LanmanSessionKey[MSV1_0_LANMAN_SESSION_KEY_LENGTH];
483   UNICODE_STRING LogonServer;
484   UNICODE_STRING UserParameters;
485 } MSV1_0_LM20_LOGON_PROFILE, * PMSV1_0_LM20_LOGON_PROFILE;
486 typedef struct _MSV1_0_SUPPLEMENTAL_CREDENTIAL {
487   ULONG Version;
488   ULONG Flags;
489   UCHAR LmPassword[MSV1_0_OWF_PASSWORD_LENGTH];
490   UCHAR NtPassword[MSV1_0_OWF_PASSWORD_LENGTH];
491 } MSV1_0_SUPPLEMENTAL_CREDENTIAL, *PMSV1_0_SUPPLEMENTAL_CREDENTIAL;
492 typedef struct _MSV1_0_NTLM3_RESPONSE {
493   UCHAR Response[MSV1_0_NTLM3_RESPONSE_LENGTH];
494   UCHAR RespType;
495   UCHAR HiRespType;
496   USHORT Flags;
497   ULONG MsgWord;
498   ULONGLONG TimeStamp;
499   UCHAR ChallengeFromClient[MSV1_0_CHALLENGE_LENGTH];
500   ULONG AvPairsOff;
501   UCHAR Buffer[1];
502 } MSV1_0_NTLM3_RESPONSE, *PMSV1_0_NTLM3_RESPONSE;
503 typedef struct  _MSV1_0_AV_PAIR {
504   USHORT AvId;
505   USHORT AvLen;
506 } MSV1_0_AV_PAIR, *PMSV1_0_AV_PAIR;
507 typedef struct _MSV1_0_CHANGEPASSWORD_REQUEST {
508   MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
509   UNICODE_STRING DomainName;
510   UNICODE_STRING AccountName;
511   UNICODE_STRING OldPassword;
512   UNICODE_STRING NewPassword;
513   BOOLEAN Impersonating;
514 } MSV1_0_CHANGEPASSWORD_REQUEST, *PMSV1_0_CHANGEPASSWORD_REQUEST;
515 typedef struct _MSV1_0_CHANGEPASSWORD_RESPONSE {
516   MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
517   BOOLEAN PasswordInfoValid;
518   DOMAIN_PASSWORD_INFORMATION DomainPasswordInfo;
519 } MSV1_0_CHANGEPASSWORD_RESPONSE, *PMSV1_0_CHANGEPASSWORD_RESPONSE;
520 typedef struct _MSV1_0_SUBAUTH_REQUEST{
521   MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
522   ULONG SubAuthPackageId;
523   ULONG SubAuthInfoLength;
524   PUCHAR SubAuthSubmitBuffer;
525 } MSV1_0_SUBAUTH_REQUEST, *PMSV1_0_SUBAUTH_REQUEST;
526 typedef struct _MSV1_0_SUBAUTH_RESPONSE{
527   MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
528   ULONG SubAuthInfoLength;
529   PUCHAR SubAuthReturnBuffer;
530 } MSV1_0_SUBAUTH_RESPONSE, *PMSV1_0_SUBAUTH_RESPONSE;
531 #define MSV1_0_DERIVECRED_TYPE_SHA1 0
532 typedef struct _MSV1_0_DERIVECRED_REQUEST {
533   MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
534   LUID LogonId;
535   ULONG DeriveCredType;
536   ULONG DeriveCredInfoLength;
537   UCHAR DeriveCredSubmitBuffer[1];
538 } MSV1_0_DERIVECRED_REQUEST, *PMSV1_0_DERIVECRED_REQUEST;
539 typedef struct _MSV1_0_DERIVECRED_RESPONSE {
540   MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
541   ULONG DeriveCredInfoLength;
542   UCHAR DeriveCredReturnBuffer[1];
543 } MSV1_0_DERIVECRED_RESPONSE, *PMSV1_0_DERIVECRED_RESPONSE;
544 typedef ULONG POLICY_AUDIT_EVENT_OPTIONS, *PPOLICY_AUDIT_EVENT_OPTIONS;
545 typedef struct _POLICY_PRIVILEGE_DEFINITION {
546   LSA_UNICODE_STRING Name;
547   LUID LocalValue;
548 } POLICY_PRIVILEGE_DEFINITION, *PPOLICY_PRIVILEGE_DEFINITION;
549 typedef struct _POLICY_AUDIT_LOG_INFO {
550   ULONG AuditLogPercentFull;
551   ULONG MaximumLogSize;
552   LARGE_INTEGER AuditRetentionPeriod;
553   BOOLEAN AuditLogFullShutdownInProgress;
554   LARGE_INTEGER TimeToShutdown;
555   ULONG NextAuditRecordId;
556 } POLICY_AUDIT_LOG_INFO, *PPOLICY_AUDIT_LOG_INFO;
557 typedef struct _POLICY_AUDIT_EVENTS_INFO {
558   BOOLEAN AuditingMode;
559   PPOLICY_AUDIT_EVENT_OPTIONS EventAuditingOptions;
560   ULONG MaximumAuditEventCount;
561 } POLICY_AUDIT_EVENTS_INFO, *PPOLICY_AUDIT_EVENTS_INFO;
562 typedef struct _POLICY_ACCOUNT_DOMAIN_INFO {
563   LSA_UNICODE_STRING DomainName;
564   PSID DomainSid;
565 } POLICY_ACCOUNT_DOMAIN_INFO, *PPOLICY_ACCOUNT_DOMAIN_INFO;
566 typedef struct _POLICY_PRIMARY_DOMAIN_INFO {
567   LSA_UNICODE_STRING Name;
568   PSID Sid;
569 } POLICY_PRIMARY_DOMAIN_INFO, *PPOLICY_PRIMARY_DOMAIN_INFO;
570 typedef struct _POLICY_DNS_DOMAIN_INFO {
571   LSA_UNICODE_STRING Name;
572   LSA_UNICODE_STRING DnsDomainName;
573   LSA_UNICODE_STRING DnsForestName;
574   GUID DomainGuid;
575   PSID Sid;
576 } POLICY_DNS_DOMAIN_INFO, *PPOLICY_DNS_DOMAIN_INFO;
577 typedef struct _POLICY_PD_ACCOUNT_INFO {
578   LSA_UNICODE_STRING Name;
579 } POLICY_PD_ACCOUNT_INFO, *PPOLICY_PD_ACCOUNT_INFO;
580 typedef struct _POLICY_LSA_SERVER_ROLE_INFO {
581   POLICY_LSA_SERVER_ROLE LsaServerRole;
582 } POLICY_LSA_SERVER_ROLE_INFO, *PPOLICY_LSA_SERVER_ROLE_INFO;
583 typedef struct _POLICY_REPLICA_SOURCE_INFO {
584   LSA_UNICODE_STRING ReplicaSource;
585   LSA_UNICODE_STRING ReplicaAccountName;
586 } POLICY_REPLICA_SOURCE_INFO, *PPOLICY_REPLICA_SOURCE_INFO;
587 typedef struct _POLICY_DEFAULT_QUOTA_INFO {
588   QUOTA_LIMITS QuotaLimits;
589 } POLICY_DEFAULT_QUOTA_INFO, *PPOLICY_DEFAULT_QUOTA_INFO;
590 typedef struct _POLICY_MODIFICATION_INFO {
591   LARGE_INTEGER ModifiedId;
592   LARGE_INTEGER DatabaseCreationTime;
593 } POLICY_MODIFICATION_INFO, *PPOLICY_MODIFICATION_INFO;
594 typedef struct _POLICY_AUDIT_FULL_SET_INFO {
595   BOOLEAN ShutDownOnFull;
596 } POLICY_AUDIT_FULL_SET_INFO, *PPOLICY_AUDIT_FULL_SET_INFO;
597 typedef struct _POLICY_AUDIT_FULL_QUERY_INFO {
598   BOOLEAN ShutDownOnFull;
599   BOOLEAN LogIsFull;
600 } POLICY_AUDIT_FULL_QUERY_INFO, *PPOLICY_AUDIT_FULL_QUERY_INFO;
601 typedef struct _POLICY_EFS_INFO {
602   ULONG InfoLength;
603   PUCHAR EfsBlob;
604 } POLICY_EFS_INFO, *PPOLICY_EFS_INFO;
605 typedef struct _POLICY_LOCAL_IPSEC_REFERENCE_INFO {
606   LSA_UNICODE_STRING ObjectPath;
607 } POLICY_LOCAL_IPSEC_REFERENCE_INFO, *PPOLICY_LOCAL_IPSEC_REFERENCE_INFO;
608 typedef struct _POLICY_LOCAL_MACHINE_PASSWORD_INFO {
609   LARGE_INTEGER PasswordChangeInterval;
610 } POLICY_LOCAL_MACHINE_PASSWORD_INFO, *PPOLICY_LOCAL_MACHINE_PASSWORD_INFO;
611 typedef struct _POLICY_LOCAL_POLICY_LOCATION_INFO {
612   ULONG PolicyLocation;
613 } POLICY_LOCAL_POLICY_LOCATION_INFO, *PPOLICY_LOCAL_POLICY_LOCATION_INFO;
614 typedef struct _POLICY_LOCAL_QUALITY_OF_SERVICE_INFO {
615   ULONG QualityOfService;
616 } POLICY_LOCAL_QUALITY_OF_SERVICE_INFO, *PPOLICY_LOCAL_QUALITY_OF_SERVICE_INFO;
617 typedef struct _POLICY_LOCAL_QUALITY_OF_SERVICE_INFO POLICY_DOMAIN_QUALITY_OF_SERVICE_INFO;
618 typedef struct _POLICY_LOCAL_QUALITY_OF_SERVICE_INFO *PPOLICY_DOMAIN_QUALITY_OF_SERVICE_INFO;
619 typedef struct _POLICY_DOMAIN_PUBLIC_KEY_INFO {
620   ULONG InfoLength;
621   PUCHAR PublicKeyInfo;
622 } POLICY_DOMAIN_PUBLIC_KEY_INFO, *PPOLICY_DOMAIN_PUBLIC_KEY_INFO;
623 typedef struct _POLICY_DOMAIN_LOCKOUT_INFO {
624   LARGE_INTEGER LockoutDuration;
625   LARGE_INTEGER LockoutObservationWindow;
626   USHORT LockoutThreshold;
627 } POLICY_DOMAIN_LOCKOUT_INFO, *PPOLICY_DOMAIN_LOCKOUT_INFO;
628 typedef struct _POLICY_DOMAIN_PASSWORD_INFO {
629   USHORT MinPasswordLength;
630   USHORT PasswordHistoryLength;
631   ULONG PasswordProperties;
632   LARGE_INTEGER MaxPasswordAge;
633   LARGE_INTEGER MinPasswordAge;
634 } POLICY_DOMAIN_PASSWORD_INFO, *PPOLICY_DOMAIN_PASSWORD_INFO;
635 typedef struct _POLICY_DOMAIN_KERBEROS_TICKET_INFO {
636   ULONG AuthenticationOptions;
637   LARGE_INTEGER MinTicketAge;
638   LARGE_INTEGER MaxTicketAge;
639   LARGE_INTEGER MaxRenewAge;
640   LARGE_INTEGER ProxyLifetime;
641   LARGE_INTEGER ForceLogoff;
642 } POLICY_DOMAIN_KERBEROS_TICKET_INFO, *PPOLICY_DOMAIN_KERBEROS_TICKET_INFO;
643 typedef PVOID LSA_HANDLE, *PLSA_HANDLE;
644 typedef struct _TRUSTED_DOMAIN_NAME_INFO {
645   LSA_UNICODE_STRING Name;
646 } TRUSTED_DOMAIN_NAME_INFO, *PTRUSTED_DOMAIN_NAME_INFO;
647 typedef struct _TRUSTED_CONTROLLERS_INFO {
648   ULONG Entries;
649   PLSA_UNICODE_STRING Names;
650 } TRUSTED_CONTROLLERS_INFO, *PTRUSTED_CONTROLLERS_INFO;
651 typedef struct _TRUSTED_POSIX_OFFSET_INFO {
652   ULONG Offset;
653 } TRUSTED_POSIX_OFFSET_INFO, *PTRUSTED_POSIX_OFFSET_INFO;
654 typedef struct _TRUSTED_PASSWORD_INFO {
655   LSA_UNICODE_STRING Password;
656   LSA_UNICODE_STRING OldPassword;
657 } TRUSTED_PASSWORD_INFO, *PTRUSTED_PASSWORD_INFO;
658 typedef  LSA_TRUST_INFORMATION TRUSTED_DOMAIN_INFORMATION_BASIC;
659 typedef PLSA_TRUST_INFORMATION *PTRUSTED_DOMAIN_INFORMATION_BASIC;
660 typedef struct _TRUSTED_DOMAIN_INFORMATION_EX {
661   LSA_UNICODE_STRING Name;
662   LSA_UNICODE_STRING FlatName;
663   PSID Sid;
664   ULONG TrustDirection;
665   ULONG TrustType;
666   ULONG TrustAttributes;
667 } TRUSTED_DOMAIN_INFORMATION_EX, *PTRUSTED_DOMAIN_INFORMATION_EX;
668 typedef struct _LSA_AUTH_INFORMATION {
669   LARGE_INTEGER LastUpdateTime;
670   ULONG AuthType;
671   ULONG AuthInfoLength;
672   PUCHAR AuthInfo;
673 } LSA_AUTH_INFORMATION, *PLSA_AUTH_INFORMATION;
674 typedef struct _TRUSTED_DOMAIN_AUTH_INFORMATION {
675   ULONG IncomingAuthInfos;
676   PLSA_AUTH_INFORMATION IncomingAuthenticationInformation;
677   PLSA_AUTH_INFORMATION IncomingPreviousAuthenticationInformation;
678   ULONG OutgoingAuthInfos;
679   PLSA_AUTH_INFORMATION OutgoingAuthenticationInformation;
680   PLSA_AUTH_INFORMATION OutgoingPreviousAuthenticationInformation;
681 } TRUSTED_DOMAIN_AUTH_INFORMATION, *PTRUSTED_DOMAIN_AUTH_INFORMATION;
682 typedef struct _TRUSTED_DOMAIN_FULL_INFORMATION {
683   TRUSTED_DOMAIN_INFORMATION_EX Information;
684   TRUSTED_POSIX_OFFSET_INFO PosixOffset;
685   TRUSTED_DOMAIN_AUTH_INFORMATION AuthInformation;
686 } TRUSTED_DOMAIN_FULL_INFORMATION, *PTRUSTED_DOMAIN_FULL_INFORMATION;
687 
688 #define RtlGenRandom                    SystemFunction036
689 #define RtlEncryptMemory                SystemFunction040
690 #define RtlDecryptMemory                SystemFunction041
691 
692 BOOLEAN WINAPI RtlGenRandom(PVOID,ULONG);
693 NTSTATUS WINAPI RtlEncryptMemory(PVOID Memory, ULONG MemorySize, ULONG OptionFlags);
694 NTSTATUS WINAPI RtlDecryptMemory(PVOID Memory, ULONG MemorySize, ULONG OptionFlags);
695 
696 #define RTL_ENCRYPT_MEMORY_SIZE           8
697 #define RTL_ENCRYPT_OPTION_SAME_PROCESS   0x00
698 #define RTL_ENCRYPT_OPTION_CROSS_PROCESS  0x01
699 #define RTL_ENCRYPT_OPTION_SAME_LOGON     0x02
700 
701 NTSTATUS NTAPI LsaAddAccountRights(LSA_HANDLE,PSID,PLSA_UNICODE_STRING,ULONG);
702 NTSTATUS NTAPI LsaAddPrivilegesToAccount(LSA_HANDLE, PPRIVILEGE_SET);
703 NTSTATUS NTAPI LsaCallAuthenticationPackage(HANDLE,ULONG,PVOID,ULONG,PVOID*,
704                             PULONG,PNTSTATUS);
705 NTSTATUS NTAPI LsaClearAuditLog(LSA_HANDLE);
706 NTSTATUS NTAPI LsaClose(LSA_HANDLE);
707 NTSTATUS NTAPI LsaConnectUntrusted(PHANDLE);
708 NTSTATUS NTAPI LsaCreateAccount(LSA_HANDLE,PSID,ACCESS_MASK,PLSA_HANDLE);
709 NTSTATUS NTAPI LsaCreateSecret(LSA_HANDLE,PLSA_UNICODE_STRING,ACCESS_MASK,PLSA_HANDLE);
710 NTSTATUS NTAPI LsaCreateTrustedDomain(LSA_HANDLE,PLSA_TRUST_INFORMATION,
711                             ACCESS_MASK,PLSA_HANDLE);
712 NTSTATUS NTAPI LsaCreateTrustedDomainEx(LSA_HANDLE,PTRUSTED_DOMAIN_INFORMATION_EX,
713                             PTRUSTED_DOMAIN_AUTH_INFORMATION,ACCESS_MASK,PLSA_HANDLE);
714 NTSTATUS NTAPI LsaDelete(LSA_HANDLE);
715 NTSTATUS NTAPI LsaDeleteTrustedDomain(LSA_HANDLE,PSID);
716 NTSTATUS NTAPI LsaDeregisterLogonProcess(HANDLE);
717 NTSTATUS NTAPI LsaEnumerateAccountRights(LSA_HANDLE,PSID,PLSA_UNICODE_STRING*,PULONG);
718 NTSTATUS NTAPI LsaEnumerateAccounts(LSA_HANDLE,PLSA_ENUMERATION_HANDLE,PVOID*,
719                             ULONG,PULONG);
720 NTSTATUS NTAPI LsaEnumerateAccountsWithUserRight(LSA_HANDLE,PLSA_UNICODE_STRING,
721                             PVOID*,PULONG);
722 NTSTATUS NTAPI LsaEnumerateLogonSessions(PULONG,PLUID*);
723 NTSTATUS NTAPI LsaEnumeratePrivileges(LSA_HANDLE,PLSA_ENUMERATION_HANDLE,
724                                       PVOID*,ULONG,PULONG);
725 NTSTATUS NTAPI LsaEnumeratePrivilegesOfAccount(LSA_HANDLE,PPRIVILEGE_SET*);
726 NTSTATUS NTAPI LsaEnumerateTrustedDomains(LSA_HANDLE,PLSA_ENUMERATION_HANDLE,
727                             PVOID*,ULONG,PULONG);
728 NTSTATUS NTAPI LsaEnumerateTrustedDomainsEx(LSA_HANDLE,PLSA_ENUMERATION_HANDLE,
729                             PVOID*,ULONG,PULONG);
730 NTSTATUS NTAPI LsaFreeMemory(PVOID);
731 NTSTATUS NTAPI LsaFreeReturnBuffer(PVOID);
732 NTSTATUS NTAPI LsaGetLogonSessionData(PLUID,PSECURITY_LOGON_SESSION_DATA*);
733 NTSTATUS NTAPI LsaGetQuotasForAccount(LSA_HANDLE,PQUOTA_LIMITS);
734 NTSTATUS NTAPI LsaGetRemoteUserName(PLSA_UNICODE_STRING, PLSA_UNICODE_STRING*,
735                             PLSA_UNICODE_STRING*);
736 NTSTATUS NTAPI LsaGetSystemAccessAccount(LSA_HANDLE, PULONG);
737 NTSTATUS NTAPI LsaGetUserName(PUNICODE_STRING*,PUNICODE_STRING*);
738 NTSTATUS NTAPI LsaLogonUser(HANDLE,PLSA_STRING,SECURITY_LOGON_TYPE,ULONG,PVOID,
739                             ULONG,PTOKEN_GROUPS,PTOKEN_SOURCE,PVOID*,PULONG,
740                             PLUID,PHANDLE,PQUOTA_LIMITS,PNTSTATUS);
741 NTSTATUS NTAPI LsaLookupAuthenticationPackage(HANDLE,PLSA_STRING,PULONG);
742 NTSTATUS NTAPI LsaLookupNames(LSA_HANDLE,ULONG,PLSA_UNICODE_STRING,
743                             PLSA_REFERENCED_DOMAIN_LIST*,PLSA_TRANSLATED_SID*);
744 NTSTATUS NTAPI LsaLookupNames2(LSA_HANDLE,ULONG,ULONG,PLSA_UNICODE_STRING,
745                             PLSA_REFERENCED_DOMAIN_LIST*,PLSA_TRANSLATED_SID2*);
746 NTSTATUS NTAPI LsaLookupPrivilegeDisplayName(LSA_HANDLE,PLSA_UNICODE_STRING,
747                             PLSA_UNICODE_STRING*,PUSHORT);
748 NTSTATUS NTAPI LsaLookupPrivilegeName(LSA_HANDLE,PLUID,PLSA_UNICODE_STRING*);
749 NTSTATUS NTAPI LsaLookupPrivilegeValue(LSA_HANDLE,PLSA_UNICODE_STRING,PLUID);
750 NTSTATUS NTAPI LsaLookupSids(LSA_HANDLE,ULONG,PSID*,
751                             PLSA_REFERENCED_DOMAIN_LIST*,PLSA_TRANSLATED_NAME*);
752 ULONG NTAPI LsaNtStatusToWinError(NTSTATUS);
753 NTSTATUS NTAPI LsaOpenAccount(LSA_HANDLE,PSID,ACCESS_MASK,PLSA_HANDLE);
754 NTSTATUS NTAPI LsaOpenPolicy(PLSA_UNICODE_STRING,PLSA_OBJECT_ATTRIBUTES,
755                             ACCESS_MASK,PLSA_HANDLE);
756 NTSTATUS NTAPI LsaOpenPolicySce(PLSA_UNICODE_STRING,PLSA_OBJECT_ATTRIBUTES,
757                             ACCESS_MASK,PLSA_HANDLE);
758 NTSTATUS NTAPI LsaOpenSecret(LSA_HANDLE, PLSA_UNICODE_STRING, ACCESS_MASK, PLSA_HANDLE);
759 NTSTATUS NTAPI LsaQuerySecurityObject(LSA_HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR*);
760 NTSTATUS NTAPI LsaOpenTrustedDomain(LSA_HANDLE,PSID,ACCESS_MASK,PLSA_HANDLE);
761 NTSTATUS NTAPI LsaOpenTrustedDomainByName(LSA_HANDLE,PLSA_UNICODE_STRING,
762                             ACCESS_MASK,PLSA_HANDLE);
763 NTSTATUS NTAPI LsaQueryDomainInformationPolicy(LSA_HANDLE,
764                             POLICY_DOMAIN_INFORMATION_CLASS,PVOID*);
765 NTSTATUS NTAPI LsaQueryInformationPolicy(LSA_HANDLE,POLICY_INFORMATION_CLASS,PVOID*);
766 NTSTATUS NTAPI LsaQuerySecret(LSA_HANDLE,PLSA_UNICODE_STRING*,PLARGE_INTEGER,
767                               PLSA_UNICODE_STRING*,PLARGE_INTEGER);
768 NTSTATUS NTAPI LsaQueryTrustedDomainInfo(LSA_HANDLE,PSID,
769                             TRUSTED_INFORMATION_CLASS,PVOID*);
770 NTSTATUS NTAPI LsaQueryTrustedDomainInfoByName(LSA_HANDLE,PLSA_UNICODE_STRING,
771                             TRUSTED_INFORMATION_CLASS,PVOID*);
772 NTSTATUS NTAPI LsaRegisterLogonProcess(PLSA_STRING,PHANDLE,PLSA_OPERATIONAL_MODE);
773 NTSTATUS NTAPI LsaRegisterPolicyChangeNotification(POLICY_NOTIFICATION_INFORMATION_CLASS,
774                             HANDLE);
775 NTSTATUS NTAPI LsaRemoveAccountRights(LSA_HANDLE,PSID,BOOLEAN,
776                             PLSA_UNICODE_STRING,ULONG);
777 NTSTATUS NTAPI LsaRemovePrivilegesFromAccount(LSA_HANDLE,BOOLEAN,PPRIVILEGE_SET);
778 NTSTATUS NTAPI LsaRetrievePrivateData(LSA_HANDLE,PLSA_UNICODE_STRING,
779                             PLSA_UNICODE_STRING*);
780 NTSTATUS NTAPI LsaSetDomainInformationPolicy(LSA_HANDLE,
781                             POLICY_DOMAIN_INFORMATION_CLASS,PVOID);
782 NTSTATUS NTAPI LsaSetInformationPolicy(LSA_HANDLE,POLICY_INFORMATION_CLASS,PVOID);
783 NTSTATUS NTAPI LsaSetInformationTrustedDomain(LSA_HANDLE,TRUSTED_INFORMATION_CLASS,
784                             PVOID);
785 NTSTATUS NTAPI LsaSetQuotasForAccount(LSA_HANDLE,PQUOTA_LIMITS);
786 NTSTATUS NTAPI LsaSetSecret(LSA_HANDLE,PLSA_UNICODE_STRING,PLSA_UNICODE_STRING);
787 NTSTATUS NTAPI LsaSetSecurityObject(LSA_HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
788 NTSTATUS NTAPI LsaSetSystemAccessAccount(LSA_HANDLE,ULONG);
789 NTSTATUS NTAPI LsaSetTrustedDomainInformation(LSA_HANDLE,PSID,
790                             TRUSTED_INFORMATION_CLASS,PVOID);
791 NTSTATUS NTAPI LsaSetTrustedDomainInfoByName(LSA_HANDLE,PLSA_UNICODE_STRING,
792                             TRUSTED_INFORMATION_CLASS,PVOID);
793 NTSTATUS NTAPI LsaStorePrivateData(LSA_HANDLE,PLSA_UNICODE_STRING,
794                             PLSA_UNICODE_STRING);
795 NTSTATUS NTAPI LsaUnregisterPolicyChangeNotification(POLICY_NOTIFICATION_INFORMATION_CLASS,
796                             HANDLE);
797 typedef NTSTATUS (NTAPI *PSAM_PASSWORD_NOTIFICATION_ROUTINE)(PUNICODE_STRING,
798                             ULONG,PUNICODE_STRING);
799 typedef BOOLEAN (NTAPI *PSAM_INIT_NOTIFICATION_ROUTINE)(VOID);
800 typedef BOOLEAN (NTAPI *PSAM_PASSWORD_FILTER_ROUTINE)(PUNICODE_STRING,PUNICODE_STRING,
801                             PUNICODE_STRING,BOOLEAN);
802 #ifdef __cplusplus
803 }
804 #endif
805 #endif /* _NTSECAPI_H */
806