e3711eb9eef179e49714106dc82c7025cddd08d4
[reactos.git] / reactos / include / psdk / ntsecapi.h
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 typedef struct _SECURITY_LOGON_SESSION_DATA {
294 ULONG Size;
295 LUID LogonId;
296 LSA_UNICODE_STRING UserName;
297 LSA_UNICODE_STRING LogonDomain;
298 LSA_UNICODE_STRING AuthenticationPackage;
299 ULONG LogonType;
300 ULONG Session;
301 PSID Sid;
302 LARGE_INTEGER LogonTime;
303 LSA_UNICODE_STRING LogonServer;
304 LSA_UNICODE_STRING DnsDomainName;
305 LSA_UNICODE_STRING Upn;
306 } SECURITY_LOGON_SESSION_DATA, *PSECURITY_LOGON_SESSION_DATA;
307 typedef enum _TRUSTED_INFORMATION_CLASS {
308 TrustedDomainNameInformation = 1,
309 TrustedControllersInformation,
310 TrustedPosixOffsetInformation,
311 TrustedPasswordInformation,
312 TrustedDomainInformationBasic,
313 TrustedDomainInformationEx,
314 TrustedDomainAuthInformation,
315 TrustedDomainFullInformation,
316 TrustedDomainAuthInformationInternal,
317 TrustedDomainFullInformationInternal
318 } TRUSTED_INFORMATION_CLASS, *PTRUSTED_INFORMATION_CLASS;
319 typedef enum _LSA_FOREST_TRUST_RECORD_TYPE {
320 ForestTrustTopLevelName,
321 ForestTrustTopLevelNameEx,
322 ForestTrustDomainInfo,
323 ForestTrustRecordTypeLast = ForestTrustDomainInfo
324 } LSA_FOREST_TRUST_RECORD_TYPE;
325 typedef enum _LSA_FOREST_TRUST_COLLISION_RECORD_TYPE {
326 CollisionTdo,
327 CollisionXref,
328 CollisionOther
329 } LSA_FOREST_TRUST_COLLISION_RECORD_TYPE;
330 #ifndef _DOMAIN_PASSWORD_INFORMATION_DEFINED
331 #define _DOMAIN_PASSWORD_INFORMATION_DEFINED
332 typedef struct _DOMAIN_PASSWORD_INFORMATION {
333 USHORT MinPasswordLength;
334 USHORT PasswordHistoryLength;
335 ULONG PasswordProperties;
336 LARGE_INTEGER MaxPasswordAge;
337 LARGE_INTEGER MinPasswordAge;
338 } DOMAIN_PASSWORD_INFORMATION, *PDOMAIN_PASSWORD_INFORMATION;
339 #endif
340 typedef ULONG LSA_ENUMERATION_HANDLE, *PLSA_ENUMERATION_HANDLE;
341 typedef struct _LSA_ENUMERATION_INFORMATION {
342 PSID Sid;
343 } LSA_ENUMERATION_INFORMATION, *PLSA_ENUMERATION_INFORMATION;
344 typedef ULONG LSA_OPERATIONAL_MODE, *PLSA_OPERATIONAL_MODE;
345
346 typedef struct _LSA_FOREST_TRUST_DOMAIN_INFO {
347 PSID Sid;
348 LSA_UNICODE_STRING DnsName;
349 LSA_UNICODE_STRING NetbiosName;
350 } LSA_FOREST_TRUST_DOMAIN_INFO, *PLSA_FOREST_TRUST_DOMAIN_INFO;
351 typedef struct _LSA_FOREST_TRUST_BINARY_DATA {
352 ULONG Length;
353 PUCHAR Buffer;
354 } LSA_FOREST_TRUST_BINARY_DATA, *PLSA_FOREST_TRUST_BINARY_DATA;
355 typedef struct _LSA_FOREST_TRUST_RECORD {
356 ULONG Flags;
357 LSA_FOREST_TRUST_RECORD_TYPE ForestTrustType;
358 LARGE_INTEGER Time;
359 union {
360 LSA_UNICODE_STRING TopLevelName;
361 LSA_FOREST_TRUST_DOMAIN_INFO DomainInfo;
362 LSA_FOREST_TRUST_BINARY_DATA Data;
363 } ForestTrustData;
364 } LSA_FOREST_TRUST_RECORD, *PLSA_FOREST_TRUST_RECORD;
365 typedef struct _LSA_FOREST_TRUST_INFORMATION {
366 ULONG RecordCount;
367 PLSA_FOREST_TRUST_RECORD *Entries;
368 } LSA_FOREST_TRUST_INFORMATION, *PLSA_FOREST_TRUST_INFORMATION;
369 typedef struct _LSA_FOREST_TRUST_COLLISION_RECORD {
370 ULONG Index;
371 LSA_FOREST_TRUST_COLLISION_RECORD_TYPE Type;
372 ULONG Flags;
373 LSA_UNICODE_STRING Name;
374 } LSA_FOREST_TRUST_COLLISION_RECORD, *PLSA_FOREST_TRUST_COLLISION_RECORD;
375 typedef struct _LSA_FOREST_TRUST_COLLISION_INFORMATION {
376 ULONG RecordCount;
377 PLSA_FOREST_TRUST_COLLISION_RECORD *Entries;
378 } LSA_FOREST_TRUST_COLLISION_INFORMATION, *PLSA_FOREST_TRUST_COLLISION_INFORMATION;
379 typedef struct _LSA_TRUST_INFORMATION {
380 LSA_UNICODE_STRING Name;
381 PSID Sid;
382 } LSA_TRUST_INFORMATION, *PLSA_TRUST_INFORMATION;
383 typedef struct _LSA_REFERENCED_DOMAIN_LIST {
384 ULONG Entries;
385 PLSA_TRUST_INFORMATION Domains;
386 } LSA_REFERENCED_DOMAIN_LIST, *PLSA_REFERENCED_DOMAIN_LIST;
387 typedef struct _LSA_TRANSLATED_SID {
388 SID_NAME_USE Use;
389 ULONG RelativeId;
390 LONG DomainIndex;
391 } LSA_TRANSLATED_SID, *PLSA_TRANSLATED_SID;
392 typedef struct _LSA_TRANSLATED_SID2 {
393 SID_NAME_USE Use;
394 PSID Sid;
395 LONG DomainIndex;
396 ULONG Flags;
397 } LSA_TRANSLATED_SID2, *PLSA_TRANSLATED_SID2;
398 typedef struct _LSA_TRANSLATED_NAME {
399 SID_NAME_USE Use;
400 LSA_UNICODE_STRING Name;
401 LONG DomainIndex;
402 } LSA_TRANSLATED_NAME, *PLSA_TRANSLATED_NAME;
403
404 typedef struct _KERB_INTERACTIVE_LOGON {
405 KERB_LOGON_SUBMIT_TYPE MessageType;
406 UNICODE_STRING LogonDomainName;
407 UNICODE_STRING UserName;
408 UNICODE_STRING Password;
409 } KERB_INTERACTIVE_LOGON, *PKERB_INTERACTIVE_LOGON;
410 typedef struct _MSV1_0_INTERACTIVE_LOGON {
411 MSV1_0_LOGON_SUBMIT_TYPE MessageType;
412 UNICODE_STRING LogonDomainName;
413 UNICODE_STRING UserName;
414 UNICODE_STRING Password;
415 } MSV1_0_INTERACTIVE_LOGON, *PMSV1_0_INTERACTIVE_LOGON;
416 typedef struct _MSV1_0_INTERACTIVE_PROFILE {
417 MSV1_0_PROFILE_BUFFER_TYPE MessageType;
418 USHORT LogonCount;
419 USHORT BadPasswordCount;
420 LARGE_INTEGER LogonTime;
421 LARGE_INTEGER LogoffTime;
422 LARGE_INTEGER KickOffTime;
423 LARGE_INTEGER PasswordLastSet;
424 LARGE_INTEGER PasswordCanChange;
425 LARGE_INTEGER PasswordMustChange;
426 UNICODE_STRING LogonScript;
427 UNICODE_STRING HomeDirectory;
428 UNICODE_STRING FullName;
429 UNICODE_STRING ProfilePath;
430 UNICODE_STRING HomeDirectoryDrive;
431 UNICODE_STRING LogonServer;
432 ULONG UserFlags;
433 } MSV1_0_INTERACTIVE_PROFILE, *PMSV1_0_INTERACTIVE_PROFILE;
434 typedef struct _MSV1_0_LM20_LOGON {
435 MSV1_0_LOGON_SUBMIT_TYPE MessageType;
436 UNICODE_STRING LogonDomainName;
437 UNICODE_STRING UserName;
438 UNICODE_STRING Workstation;
439 UCHAR ChallengeToClient[MSV1_0_CHALLENGE_LENGTH];
440 STRING CaseSensitiveChallengeResponse;
441 STRING CaseInsensitiveChallengeResponse;
442 ULONG ParameterControl;
443 } MSV1_0_LM20_LOGON, * PMSV1_0_LM20_LOGON;
444 typedef struct _MSV1_0_SUBAUTH_LOGON{ /* W2K only */
445 MSV1_0_LOGON_SUBMIT_TYPE MessageType;
446 UNICODE_STRING LogonDomainName;
447 UNICODE_STRING UserName;
448 UNICODE_STRING Workstation;
449 UCHAR ChallengeToClient[MSV1_0_CHALLENGE_LENGTH];
450 STRING AuthenticationInfo1;
451 STRING AuthenticationInfo2;
452 ULONG ParameterControl;
453 ULONG SubAuthPackageId;
454 } MSV1_0_SUBAUTH_LOGON, * PMSV1_0_SUBAUTH_LOGON;
455 typedef struct _MSV1_0_LM20_LOGON_PROFILE {
456 MSV1_0_PROFILE_BUFFER_TYPE MessageType;
457 LARGE_INTEGER KickOffTime;
458 LARGE_INTEGER LogoffTime;
459 ULONG UserFlags;
460 UCHAR UserSessionKey[MSV1_0_USER_SESSION_KEY_LENGTH];
461 UNICODE_STRING LogonDomainName;
462 UCHAR LanmanSessionKey[MSV1_0_LANMAN_SESSION_KEY_LENGTH];
463 UNICODE_STRING LogonServer;
464 UNICODE_STRING UserParameters;
465 } MSV1_0_LM20_LOGON_PROFILE, * PMSV1_0_LM20_LOGON_PROFILE;
466 typedef struct _MSV1_0_SUPPLEMENTAL_CREDENTIAL {
467 ULONG Version;
468 ULONG Flags;
469 UCHAR LmPassword[MSV1_0_OWF_PASSWORD_LENGTH];
470 UCHAR NtPassword[MSV1_0_OWF_PASSWORD_LENGTH];
471 } MSV1_0_SUPPLEMENTAL_CREDENTIAL, *PMSV1_0_SUPPLEMENTAL_CREDENTIAL;
472 typedef struct _MSV1_0_NTLM3_RESPONSE {
473 UCHAR Response[MSV1_0_NTLM3_RESPONSE_LENGTH];
474 UCHAR RespType;
475 UCHAR HiRespType;
476 USHORT Flags;
477 ULONG MsgWord;
478 ULONGLONG TimeStamp;
479 UCHAR ChallengeFromClient[MSV1_0_CHALLENGE_LENGTH];
480 ULONG AvPairsOff;
481 UCHAR Buffer[1];
482 } MSV1_0_NTLM3_RESPONSE, *PMSV1_0_NTLM3_RESPONSE;
483 typedef struct _MSV1_0_AV_PAIR {
484 USHORT AvId;
485 USHORT AvLen;
486 } MSV1_0_AV_PAIR, *PMSV1_0_AV_PAIR;
487 typedef struct _MSV1_0_CHANGEPASSWORD_REQUEST {
488 MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
489 UNICODE_STRING DomainName;
490 UNICODE_STRING AccountName;
491 UNICODE_STRING OldPassword;
492 UNICODE_STRING NewPassword;
493 BOOLEAN Impersonating;
494 } MSV1_0_CHANGEPASSWORD_REQUEST, *PMSV1_0_CHANGEPASSWORD_REQUEST;
495 typedef struct _MSV1_0_CHANGEPASSWORD_RESPONSE {
496 MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
497 BOOLEAN PasswordInfoValid;
498 DOMAIN_PASSWORD_INFORMATION DomainPasswordInfo;
499 } MSV1_0_CHANGEPASSWORD_RESPONSE, *PMSV1_0_CHANGEPASSWORD_RESPONSE;
500 typedef struct _MSV1_0_SUBAUTH_REQUEST{
501 MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
502 ULONG SubAuthPackageId;
503 ULONG SubAuthInfoLength;
504 PUCHAR SubAuthSubmitBuffer;
505 } MSV1_0_SUBAUTH_REQUEST, *PMSV1_0_SUBAUTH_REQUEST;
506 typedef struct _MSV1_0_SUBAUTH_RESPONSE{
507 MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
508 ULONG SubAuthInfoLength;
509 PUCHAR SubAuthReturnBuffer;
510 } MSV1_0_SUBAUTH_RESPONSE, *PMSV1_0_SUBAUTH_RESPONSE;
511 #define MSV1_0_DERIVECRED_TYPE_SHA1 0
512 typedef struct _MSV1_0_DERIVECRED_REQUEST {
513 MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
514 LUID LogonId;
515 ULONG DeriveCredType;
516 ULONG DeriveCredInfoLength;
517 UCHAR DeriveCredSubmitBuffer[1];
518 } MSV1_0_DERIVECRED_REQUEST, *PMSV1_0_DERIVECRED_REQUEST;
519 typedef struct _MSV1_0_DERIVECRED_RESPONSE {
520 MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
521 ULONG DeriveCredInfoLength;
522 UCHAR DeriveCredReturnBuffer[1];
523 } MSV1_0_DERIVECRED_RESPONSE, *PMSV1_0_DERIVECRED_RESPONSE;
524 typedef ULONG POLICY_AUDIT_EVENT_OPTIONS, *PPOLICY_AUDIT_EVENT_OPTIONS;
525 typedef struct _POLICY_PRIVILEGE_DEFINITION {
526 LSA_UNICODE_STRING Name;
527 LUID LocalValue;
528 } POLICY_PRIVILEGE_DEFINITION, *PPOLICY_PRIVILEGE_DEFINITION;
529 typedef struct _POLICY_AUDIT_LOG_INFO {
530 ULONG AuditLogPercentFull;
531 ULONG MaximumLogSize;
532 LARGE_INTEGER AuditRetentionPeriod;
533 BOOLEAN AuditLogFullShutdownInProgress;
534 LARGE_INTEGER TimeToShutdown;
535 ULONG NextAuditRecordId;
536 } POLICY_AUDIT_LOG_INFO, *PPOLICY_AUDIT_LOG_INFO;
537 typedef struct _POLICY_AUDIT_EVENTS_INFO {
538 BOOLEAN AuditingMode;
539 PPOLICY_AUDIT_EVENT_OPTIONS EventAuditingOptions;
540 ULONG MaximumAuditEventCount;
541 } POLICY_AUDIT_EVENTS_INFO, *PPOLICY_AUDIT_EVENTS_INFO;
542 typedef struct _POLICY_ACCOUNT_DOMAIN_INFO {
543 LSA_UNICODE_STRING DomainName;
544 PSID DomainSid;
545 } POLICY_ACCOUNT_DOMAIN_INFO, *PPOLICY_ACCOUNT_DOMAIN_INFO;
546 typedef struct _POLICY_PRIMARY_DOMAIN_INFO {
547 LSA_UNICODE_STRING Name;
548 PSID Sid;
549 } POLICY_PRIMARY_DOMAIN_INFO, *PPOLICY_PRIMARY_DOMAIN_INFO;
550 typedef struct _POLICY_DNS_DOMAIN_INFO {
551 LSA_UNICODE_STRING Name;
552 LSA_UNICODE_STRING DnsDomainName;
553 LSA_UNICODE_STRING DnsForestName;
554 GUID DomainGuid;
555 PSID Sid;
556 } POLICY_DNS_DOMAIN_INFO, *PPOLICY_DNS_DOMAIN_INFO;
557 typedef struct _POLICY_PD_ACCOUNT_INFO {
558 LSA_UNICODE_STRING Name;
559 } POLICY_PD_ACCOUNT_INFO, *PPOLICY_PD_ACCOUNT_INFO;
560 typedef struct _POLICY_LSA_SERVER_ROLE_INFO {
561 POLICY_LSA_SERVER_ROLE LsaServerRole;
562 } POLICY_LSA_SERVER_ROLE_INFO, *PPOLICY_LSA_SERVER_ROLE_INFO;
563 typedef struct _POLICY_REPLICA_SOURCE_INFO {
564 LSA_UNICODE_STRING ReplicaSource;
565 LSA_UNICODE_STRING ReplicaAccountName;
566 } POLICY_REPLICA_SOURCE_INFO, *PPOLICY_REPLICA_SOURCE_INFO;
567 typedef struct _POLICY_DEFAULT_QUOTA_INFO {
568 QUOTA_LIMITS QuotaLimits;
569 } POLICY_DEFAULT_QUOTA_INFO, *PPOLICY_DEFAULT_QUOTA_INFO;
570 typedef struct _POLICY_MODIFICATION_INFO {
571 LARGE_INTEGER ModifiedId;
572 LARGE_INTEGER DatabaseCreationTime;
573 } POLICY_MODIFICATION_INFO, *PPOLICY_MODIFICATION_INFO;
574 typedef struct _POLICY_AUDIT_FULL_SET_INFO {
575 BOOLEAN ShutDownOnFull;
576 } POLICY_AUDIT_FULL_SET_INFO, *PPOLICY_AUDIT_FULL_SET_INFO;
577 typedef struct _POLICY_AUDIT_FULL_QUERY_INFO {
578 BOOLEAN ShutDownOnFull;
579 BOOLEAN LogIsFull;
580 } POLICY_AUDIT_FULL_QUERY_INFO, *PPOLICY_AUDIT_FULL_QUERY_INFO;
581 typedef struct _POLICY_EFS_INFO {
582 ULONG InfoLength;
583 PUCHAR EfsBlob;
584 } POLICY_EFS_INFO, *PPOLICY_EFS_INFO;
585 typedef struct _POLICY_LOCAL_IPSEC_REFERENCE_INFO {
586 LSA_UNICODE_STRING ObjectPath;
587 } POLICY_LOCAL_IPSEC_REFERENCE_INFO, *PPOLICY_LOCAL_IPSEC_REFERENCE_INFO;
588 typedef struct _POLICY_LOCAL_MACHINE_PASSWORD_INFO {
589 LARGE_INTEGER PasswordChangeInterval;
590 } POLICY_LOCAL_MACHINE_PASSWORD_INFO, *PPOLICY_LOCAL_MACHINE_PASSWORD_INFO;
591 typedef struct _POLICY_LOCAL_POLICY_LOCATION_INFO {
592 ULONG PolicyLocation;
593 } POLICY_LOCAL_POLICY_LOCATION_INFO, *PPOLICY_LOCAL_POLICY_LOCATION_INFO;
594 typedef struct _POLICY_LOCAL_QUALITY_OF_SERVICE_INFO {
595 ULONG QualityOfService;
596 } POLICY_LOCAL_QUALITY_OF_SERVICE_INFO, *PPOLICY_LOCAL_QUALITY_OF_SERVICE_INFO;
597 typedef struct _POLICY_LOCAL_QUALITY_OF_SERVICE_INFO POLICY_DOMAIN_QUALITY_OF_SERVICE_INFO;
598 typedef struct _POLICY_LOCAL_QUALITY_OF_SERVICE_INFO *PPOLICY_DOMAIN_QUALITY_OF_SERVICE_INFO;
599 typedef struct _POLICY_DOMAIN_PUBLIC_KEY_INFO {
600 ULONG InfoLength;
601 PUCHAR PublicKeyInfo;
602 } POLICY_DOMAIN_PUBLIC_KEY_INFO, *PPOLICY_DOMAIN_PUBLIC_KEY_INFO;
603 typedef struct _POLICY_DOMAIN_LOCKOUT_INFO {
604 LARGE_INTEGER LockoutDuration;
605 LARGE_INTEGER LockoutObservationWindow;
606 USHORT LockoutThreshold;
607 } POLICY_DOMAIN_LOCKOUT_INFO, *PPOLICY_DOMAIN_LOCKOUT_INFO;
608 typedef struct _POLICY_DOMAIN_PASSWORD_INFO {
609 USHORT MinPasswordLength;
610 USHORT PasswordHistoryLength;
611 ULONG PasswordProperties;
612 LARGE_INTEGER MaxPasswordAge;
613 LARGE_INTEGER MinPasswordAge;
614 } POLICY_DOMAIN_PASSWORD_INFO, *PPOLICY_DOMAIN_PASSWORD_INFO;
615 typedef struct _POLICY_DOMAIN_KERBEROS_TICKET_INFO {
616 ULONG AuthenticationOptions;
617 LARGE_INTEGER MinTicketAge;
618 LARGE_INTEGER MaxTicketAge;
619 LARGE_INTEGER MaxRenewAge;
620 LARGE_INTEGER ProxyLifetime;
621 LARGE_INTEGER ForceLogoff;
622 } POLICY_DOMAIN_KERBEROS_TICKET_INFO, *PPOLICY_DOMAIN_KERBEROS_TICKET_INFO;
623 typedef PVOID LSA_HANDLE, *PLSA_HANDLE;
624 typedef struct _TRUSTED_DOMAIN_NAME_INFO {
625 LSA_UNICODE_STRING Name;
626 } TRUSTED_DOMAIN_NAME_INFO, *PTRUSTED_DOMAIN_NAME_INFO;
627 typedef struct _TRUSTED_CONTROLLERS_INFO {
628 ULONG Entries;
629 PLSA_UNICODE_STRING Names;
630 } TRUSTED_CONTROLLERS_INFO, *PTRUSTED_CONTROLLERS_INFO;
631 typedef struct _TRUSTED_POSIX_OFFSET_INFO {
632 ULONG Offset;
633 } TRUSTED_POSIX_OFFSET_INFO, *PTRUSTED_POSIX_OFFSET_INFO;
634 typedef struct _TRUSTED_PASSWORD_INFO {
635 LSA_UNICODE_STRING Password;
636 LSA_UNICODE_STRING OldPassword;
637 } TRUSTED_PASSWORD_INFO, *PTRUSTED_PASSWORD_INFO;
638 typedef LSA_TRUST_INFORMATION TRUSTED_DOMAIN_INFORMATION_BASIC;
639 typedef PLSA_TRUST_INFORMATION *PTRUSTED_DOMAIN_INFORMATION_BASIC;
640 typedef struct _TRUSTED_DOMAIN_INFORMATION_EX {
641 LSA_UNICODE_STRING Name;
642 LSA_UNICODE_STRING FlatName;
643 PSID Sid;
644 ULONG TrustDirection;
645 ULONG TrustType;
646 ULONG TrustAttributes;
647 } TRUSTED_DOMAIN_INFORMATION_EX, *PTRUSTED_DOMAIN_INFORMATION_EX;
648 typedef struct _LSA_AUTH_INFORMATION {
649 LARGE_INTEGER LastUpdateTime;
650 ULONG AuthType;
651 ULONG AuthInfoLength;
652 PUCHAR AuthInfo;
653 } LSA_AUTH_INFORMATION, *PLSA_AUTH_INFORMATION;
654 typedef struct _TRUSTED_DOMAIN_AUTH_INFORMATION {
655 ULONG IncomingAuthInfos;
656 PLSA_AUTH_INFORMATION IncomingAuthenticationInformation;
657 PLSA_AUTH_INFORMATION IncomingPreviousAuthenticationInformation;
658 ULONG OutgoingAuthInfos;
659 PLSA_AUTH_INFORMATION OutgoingAuthenticationInformation;
660 PLSA_AUTH_INFORMATION OutgoingPreviousAuthenticationInformation;
661 } TRUSTED_DOMAIN_AUTH_INFORMATION, *PTRUSTED_DOMAIN_AUTH_INFORMATION;
662 typedef struct _TRUSTED_DOMAIN_FULL_INFORMATION {
663 TRUSTED_DOMAIN_INFORMATION_EX Information;
664 TRUSTED_POSIX_OFFSET_INFO PosixOffset;
665 TRUSTED_DOMAIN_AUTH_INFORMATION AuthInformation;
666 } TRUSTED_DOMAIN_FULL_INFORMATION, *PTRUSTED_DOMAIN_FULL_INFORMATION;
667
668 #define RtlGenRandom SystemFunction036
669 #define RtlEncryptMemory SystemFunction040
670 #define RtlDecryptMemory SystemFunction041
671
672 BOOLEAN WINAPI RtlGenRandom(PVOID,ULONG);
673 NTSTATUS WINAPI RtlEncryptMemory(PVOID Memory, ULONG MemorySize, ULONG OptionFlags);
674 NTSTATUS WINAPI RtlDecryptMemory(PVOID Memory, ULONG MemorySize, ULONG OptionFlags);
675
676 #define RTL_ENCRYPT_MEMORY_SIZE 8
677 #define RTL_ENCRYPT_OPTION_SAME_PROCESS 0x00
678 #define RTL_ENCRYPT_OPTION_CROSS_PROCESS 0x01
679 #define RTL_ENCRYPT_OPTION_SAME_LOGON 0x02
680
681 NTSTATUS NTAPI LsaAddAccountRights(LSA_HANDLE,PSID,PLSA_UNICODE_STRING,ULONG);
682 NTSTATUS NTAPI LsaAddPrivilegesToAccount(LSA_HANDLE, PPRIVILEGE_SET);
683 NTSTATUS NTAPI LsaCallAuthenticationPackage(HANDLE,ULONG,PVOID,ULONG,PVOID*,
684 PULONG,PNTSTATUS);
685 NTSTATUS NTAPI LsaClearAuditLog(LSA_HANDLE);
686 NTSTATUS NTAPI LsaClose(LSA_HANDLE);
687 NTSTATUS NTAPI LsaConnectUntrusted(PHANDLE);
688 NTSTATUS NTAPI LsaCreateAccount(LSA_HANDLE,PSID,ACCESS_MASK,PLSA_HANDLE);
689 NTSTATUS NTAPI LsaCreateSecret(LSA_HANDLE,PLSA_UNICODE_STRING,ACCESS_MASK,PLSA_HANDLE);
690 NTSTATUS NTAPI LsaCreateTrustedDomain(LSA_HANDLE,PLSA_TRUST_INFORMATION,
691 ACCESS_MASK,PLSA_HANDLE);
692 NTSTATUS NTAPI LsaCreateTrustedDomainEx(LSA_HANDLE,PTRUSTED_DOMAIN_INFORMATION_EX,
693 PTRUSTED_DOMAIN_AUTH_INFORMATION,ACCESS_MASK,PLSA_HANDLE);
694 NTSTATUS NTAPI LsaDelete(LSA_HANDLE);
695 NTSTATUS NTAPI LsaDeleteTrustedDomain(LSA_HANDLE,PSID);
696 NTSTATUS NTAPI LsaDeregisterLogonProcess(HANDLE);
697 NTSTATUS NTAPI LsaEnumerateAccountRights(LSA_HANDLE,PSID,PLSA_UNICODE_STRING*,PULONG);
698 NTSTATUS NTAPI LsaEnumerateAccounts(LSA_HANDLE,PLSA_ENUMERATION_HANDLE,PVOID*,
699 ULONG,PULONG);
700 NTSTATUS NTAPI LsaEnumerateAccountsWithUserRight(LSA_HANDLE,PLSA_UNICODE_STRING,
701 PVOID*,PULONG);
702 NTSTATUS NTAPI LsaEnumeratePrivileges(LSA_HANDLE,PLSA_ENUMERATION_HANDLE,
703 PVOID*,ULONG,PULONG);
704 NTSTATUS NTAPI LsaEnumeratePrivilegesOfAccount(LSA_HANDLE,PPRIVILEGE_SET*);
705 NTSTATUS NTAPI LsaEnumerateTrustedDomains(LSA_HANDLE,PLSA_ENUMERATION_HANDLE,
706 PVOID*,ULONG,PULONG);
707 NTSTATUS NTAPI LsaEnumerateTrustedDomainsEx(LSA_HANDLE,PLSA_ENUMERATION_HANDLE,
708 PVOID*,ULONG,PULONG);
709 NTSTATUS NTAPI LsaFreeMemory(PVOID);
710 NTSTATUS NTAPI LsaFreeReturnBuffer(PVOID);
711 NTSTATUS NTAPI LsaGetQuotasForAccount(LSA_HANDLE,PQUOTA_LIMITS);
712 NTSTATUS NTAPI LsaGetRemoteUserName(PLSA_UNICODE_STRING, PLSA_UNICODE_STRING*,
713 PLSA_UNICODE_STRING*);
714 NTSTATUS NTAPI LsaGetSystemAccessAccount(LSA_HANDLE, PULONG);
715 NTSTATUS NTAPI LsaGetUserName(PUNICODE_STRING*,PUNICODE_STRING*);
716 NTSTATUS NTAPI LsaLogonUser(HANDLE,PLSA_STRING,SECURITY_LOGON_TYPE,ULONG,PVOID,
717 ULONG,PTOKEN_GROUPS,PTOKEN_SOURCE,PVOID*,PULONG,
718 PLUID,PHANDLE,PQUOTA_LIMITS,PNTSTATUS);
719 NTSTATUS NTAPI LsaLookupAuthenticationPackage(HANDLE,PLSA_STRING,PULONG);
720 NTSTATUS NTAPI LsaLookupNames(LSA_HANDLE,ULONG,PLSA_UNICODE_STRING,
721 PLSA_REFERENCED_DOMAIN_LIST*,PLSA_TRANSLATED_SID*);
722 NTSTATUS NTAPI LsaLookupNames2(LSA_HANDLE,ULONG,ULONG,PLSA_UNICODE_STRING,
723 PLSA_REFERENCED_DOMAIN_LIST*,PLSA_TRANSLATED_SID2*);
724 NTSTATUS NTAPI LsaLookupPrivilegeDisplayName(LSA_HANDLE,PLSA_UNICODE_STRING,
725 PLSA_UNICODE_STRING*,PSHORT);
726 NTSTATUS NTAPI LsaLookupPrivilegeName(LSA_HANDLE,PLUID,PLSA_UNICODE_STRING*);
727 NTSTATUS NTAPI LsaLookupPrivilegeValue(LSA_HANDLE,PLSA_UNICODE_STRING,PLUID);
728 NTSTATUS NTAPI LsaLookupSids(LSA_HANDLE,ULONG,PSID*,
729 PLSA_REFERENCED_DOMAIN_LIST*,PLSA_TRANSLATED_NAME*);
730 ULONG NTAPI LsaNtStatusToWinError(NTSTATUS);
731 NTSTATUS NTAPI LsaOpenAccount(LSA_HANDLE,PSID,ACCESS_MASK,PLSA_HANDLE);
732 NTSTATUS NTAPI LsaOpenPolicy(PLSA_UNICODE_STRING,PLSA_OBJECT_ATTRIBUTES,
733 ACCESS_MASK,PLSA_HANDLE);
734 NTSTATUS NTAPI LsaOpenPolicySce(PLSA_UNICODE_STRING,PLSA_OBJECT_ATTRIBUTES,
735 ACCESS_MASK,PLSA_HANDLE);
736 NTSTATUS NTAPI LsaOpenSecret(LSA_HANDLE, PLSA_UNICODE_STRING, ACCESS_MASK, PLSA_HANDLE);
737 NTSTATUS NTAPI LsaQuerySecurityObject(LSA_HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR*);
738 NTSTATUS NTAPI LsaOpenTrustedDomain(LSA_HANDLE,PSID,ACCESS_MASK,PLSA_HANDLE);
739 NTSTATUS NTAPI LsaOpenTrustedDomainByName(LSA_HANDLE,PLSA_UNICODE_STRING,
740 ACCESS_MASK,PLSA_HANDLE);
741 NTSTATUS NTAPI LsaQueryDomainInformationPolicy(LSA_HANDLE,
742 POLICY_DOMAIN_INFORMATION_CLASS,PVOID*);
743 NTSTATUS NTAPI LsaQueryInformationPolicy(LSA_HANDLE,POLICY_INFORMATION_CLASS,PVOID*);
744 NTSTATUS NTAPI LsaQuerySecret(LSA_HANDLE,PLSA_UNICODE_STRING*,PLARGE_INTEGER,
745 PLSA_UNICODE_STRING*,PLARGE_INTEGER);
746 NTSTATUS NTAPI LsaQueryTrustedDomainInfo(LSA_HANDLE,PSID,
747 TRUSTED_INFORMATION_CLASS,PVOID*);
748 NTSTATUS NTAPI LsaQueryTrustedDomainInfoByName(LSA_HANDLE,PLSA_UNICODE_STRING,
749 TRUSTED_INFORMATION_CLASS,PVOID*);
750 NTSTATUS NTAPI LsaRegisterLogonProcess(PLSA_STRING,PHANDLE,PLSA_OPERATIONAL_MODE);
751 NTSTATUS NTAPI LsaRemoveAccountRights(LSA_HANDLE,PSID,BOOLEAN,
752 PLSA_UNICODE_STRING,ULONG);
753 NTSTATUS NTAPI LsaRemovePrivilegesFromAccount(LSA_HANDLE,BOOLEAN,PPRIVILEGE_SET);
754 NTSTATUS NTAPI LsaRetrievePrivateData(LSA_HANDLE,PLSA_UNICODE_STRING,
755 PLSA_UNICODE_STRING*);
756 NTSTATUS NTAPI LsaSetDomainInformationPolicy(LSA_HANDLE,
757 POLICY_DOMAIN_INFORMATION_CLASS,PVOID);
758 NTSTATUS NTAPI LsaSetInformationPolicy(LSA_HANDLE,POLICY_INFORMATION_CLASS,PVOID);
759 NTSTATUS NTAPI LsaSetInformationTrustedDomain(LSA_HANDLE,TRUSTED_INFORMATION_CLASS,
760 PVOID);
761 NTSTATUS NTAPI LsaSetQuotasForAccount(LSA_HANDLE,PQUOTA_LIMITS);
762 NTSTATUS NTAPI LsaSetSecret(LSA_HANDLE,PLSA_UNICODE_STRING,PLSA_UNICODE_STRING);
763 NTSTATUS NTAPI LsaSetSecurityObject(LSA_HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
764 NTSTATUS NTAPI LsaSetSystemAccessAccount(LSA_HANDLE,ULONG);
765 NTSTATUS NTAPI LsaSetTrustedDomainInformation(LSA_HANDLE,PSID,
766 TRUSTED_INFORMATION_CLASS,PVOID);
767 NTSTATUS NTAPI LsaSetTrustedDomainInfoByName(LSA_HANDLE,PLSA_UNICODE_STRING,
768 TRUSTED_INFORMATION_CLASS,PVOID);
769 NTSTATUS NTAPI LsaStorePrivateData(LSA_HANDLE,PLSA_UNICODE_STRING,
770 PLSA_UNICODE_STRING);
771 typedef NTSTATUS (NTAPI *PSAM_PASSWORD_NOTIFICATION_ROUTINE)(PUNICODE_STRING,
772 ULONG,PUNICODE_STRING);
773 typedef BOOLEAN (NTAPI *PSAM_INIT_NOTIFICATION_ROUTINE)(VOID);
774 typedef BOOLEAN (NTAPI *PSAM_PASSWORD_FILTER_ROUTINE)(PUNICODE_STRING,PUNICODE_STRING,
775 PUNICODE_STRING,BOOLEAN);
776 #ifdef __cplusplus
777 }
778 #endif
779 #endif /* _NTSECAPI_H */