VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/ntsecpkg.h@ 19982

Last change on this file since 19982 was 16477, checked in by vboxsync, 16 years ago

LGPL disclaimer by filemuncher

  • Property svn:eol-style set to native
File size: 19.1 KB
Line 
1/*
2 * Copyright (C) 2007 Yuval Fledel
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19/*
20 * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
21 * other than GPL or LGPL is available it will apply instead, Sun elects to use only
22 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
23 * a choice of LGPL license versions is made available with the language indicating
24 * that LGPLv2 or any later version may be used, or where a choice of which version
25 * of the LGPL is applied is otherwise unspecified.
26 */
27
28#ifndef _NTSECPKG_H
29#define _NTSECPKG_H
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35/* Flags for the MachineState field in SECPKG_PARAMETERS */
36#define SECPKG_STATE_ENCRYPTION_PERMITTED 0x01
37#define SECPKG_STATE_STRONG_ENCRYPTION_PERMITTED 0x02
38#define SECPKG_STATE_DOMAIN_CONTROLLER 0x04
39#define SECPKG_STATE_WORKSTATION 0x08
40#define SECPKG_STATE_STANDALONE 0x10
41
42/* Version magics as passed to or returned from Sp[Lsa,Mode]ModeInitialize */
43#define SECPKG_INTERFACE_VERSION 0x10000
44#define SECPKG_INTERFACE_VERSION_2 0x20000
45#define SECPKG_INTERFACE_VERSION_3 0x40000
46
47/* enum definitions for Secure Service Provider/Authentication Packages */
48typedef enum _LSA_TOKEN_INFORMATION_TYPE {
49 LsaTokenInformationNull,
50 LsaTokenInformationV1
51} LSA_TOKEN_INFORMATION_TYPE, *PLSA_TOKEN_INFORMATION_TYPE;
52
53typedef enum _SECPKG_EXTENDED_INFORMATION_CLASS
54{
55 SecpkgGssInfo = 1,
56 SecpkgContextThunks,
57 SecpkgMutualAuthLevel,
58 SecpkgMaxInfo
59} SECPKG_EXTENDED_INFORMATION_CLASS;
60
61typedef enum _SECPKG_NAME_TYPE {
62 SecNameSamCompatible,
63 SecNameAlternateId,
64 SecNameFlat,
65 SecNameDN
66} SECPKG_NAME_TYPE;
67
68/* struct definitions for SSP/AP */
69typedef struct _SECPKG_PRIMARY_CRED {
70 LUID LogonId;
71 UNICODE_STRING DownlevelName;
72 UNICODE_STRING DomainName;
73 UNICODE_STRING Password;
74 UNICODE_STRING OldPassword;
75 PSID UserSid;
76 ULONG Flags;
77 UNICODE_STRING DnsDomainName;
78 UNICODE_STRING Upn;
79 UNICODE_STRING LogonServer;
80 UNICODE_STRING Spare1;
81 UNICODE_STRING Spare2;
82 UNICODE_STRING Spare3;
83 UNICODE_STRING Spare4;
84} SECPKG_PRIMARY_CRED, *PSECPKG_PRIMARY_CRED;
85
86typedef struct _SECPKG_SUPPLEMENTAL_CRED {
87 UNICODE_STRING PackageName;
88 ULONG CredentialSize;
89 PUCHAR Credentials;
90} SECPKG_SUPPLEMENTAL_CRED, *PSECPKG_SUPPLEMENTAL_CRED;
91
92typedef struct _SECPKG_SUPPLEMENTAL_CRED_ARRAY {
93 ULONG CredentialCount;
94 SECPKG_SUPPLEMENTAL_CRED Credentials[1];
95} SECPKG_SUPPLEMENTAL_CRED_ARRAY, *PSECPKG_SUPPLEMENTAL_CRED_ARRAY;
96
97typedef struct _SECPKG_PARAMETERS {
98 ULONG Version;
99 ULONG MachineState;
100 ULONG SetupMode;
101 PSID DomainSid;
102 UNICODE_STRING DomainName;
103 UNICODE_STRING DnsDomainName;
104 GUID DomainGuid;
105} SECPKG_PARAMETERS, *PSECPKG_PARAMETERS,
106 SECPKG_EVENT_DOMAIN_CHANGE, *PSECPKG_EVENT_DOMAIN_CHANGE;
107
108typedef struct _SECPKG_CLIENT_INFO {
109 LUID LogonId;
110 ULONG ProcessID;
111 ULONG ThreadID;
112 BOOLEAN HasTcbPrivilege;
113 BOOLEAN Impersonating;
114 BOOLEAN Restricted;
115} SECPKG_CLIENT_INFO,
116 *PSECPKG_CLIENT_INFO;
117
118typedef struct _SECURITY_USER_DATA {
119 UNICODE_STRING UserName;
120 UNICODE_STRING LogonDomainName;
121 UNICODE_STRING LogonServer;
122 PSID pSid;
123} SECURITY_USER_DATA, *PSECURITY_USER_DATA,
124 SecurityUserData, *PSecurityUserData;
125
126typedef struct _SECPKG_GSS_INFO {
127 ULONG EncodedIdLength;
128 UCHAR EncodedId[4];
129} SECPKG_GSS_INFO, *PSECPKG_GSS_INFO;
130
131typedef struct _SECPKG_CONTEXT_THUNKS {
132 ULONG InfoLevelCount;
133 ULONG Levels[1];
134} SECPKG_CONTEXT_THUNKS, *PSECPKG_CONTEXT_THUNKS;
135
136typedef struct _SECPKG_MUTUAL_AUTH_LEVEL {
137 ULONG MutualAuthLevel;
138} SECPKG_MUTUAL_AUTH_LEVEL, *PSECPKG_MUTUAL_AUTH_LEVEL;
139
140typedef struct _SECPKG_CALL_INFO {
141 ULONG ProcessId;
142 ULONG ThreadId;
143 ULONG Attributes;
144 ULONG CallCount;
145} SECPKG_CALL_INFO, *PSECPKG_CALL_INFO;
146
147typedef struct _SECPKG_EXTENDED_INFORMATION {
148 SECPKG_EXTENDED_INFORMATION_CLASS Class;
149 union {
150 SECPKG_GSS_INFO GssInfo;
151 SECPKG_CONTEXT_THUNKS ContextThunks;
152 SECPKG_MUTUAL_AUTH_LEVEL MutualAuthLevel;
153 } Info;
154} SECPKG_EXTENDED_INFORMATION, *PSECPKG_EXTENDED_INFORMATION;
155
156/* callbacks implemented by SSP/AP dlls and called by the LSA */
157typedef VOID (NTAPI *PLSA_CALLBACK_FUNCTION)(ULONG_PTR, ULONG_PTR, PSecBuffer,
158 PSecBuffer);
159
160/* misc typedefs used in the below prototypes */
161typedef PVOID *PLSA_CLIENT_REQUEST;
162typedef ULONG LSA_SEC_HANDLE, *PLSA_SEC_HANDLE;
163typedef LPTHREAD_START_ROUTINE SEC_THREAD_START;
164typedef PSECURITY_ATTRIBUTES SEC_ATTRS;
165
166/* functions used by SSP/AP obtainable by dispatch tables */
167typedef NTSTATUS (NTAPI *PLSA_REGISTER_CALLBACK)(ULONG, PLSA_CALLBACK_FUNCTION);
168typedef NTSTATUS (NTAPI *PLSA_CREATE_LOGON_SESSION)(PLUID);
169typedef NTSTATUS (NTAPI *PLSA_DELETE_LOGON_SESSION)(PLUID);
170typedef NTSTATUS (NTAPI *PLSA_ADD_CREDENTIAL)(PLUID, ULONG, PLSA_STRING,
171 PLSA_STRING);
172typedef NTSTATUS (NTAPI *PLSA_GET_CREDENTIALS)(PLUID, ULONG, PULONG, BOOLEAN,
173 PLSA_STRING, PULONG, PLSA_STRING);
174typedef NTSTATUS (NTAPI *PLSA_DELETE_CREDENTIAL)(PLUID, ULONG, PLSA_STRING);
175typedef PVOID (NTAPI *PLSA_ALLOCATE_LSA_HEAP)(ULONG);
176typedef VOID (NTAPI *PLSA_FREE_LSA_HEAP)(PVOID);
177typedef NTSTATUS (NTAPI *PLSA_ALLOCATE_CLIENT_BUFFER)(PLSA_CLIENT_REQUEST,
178 ULONG, PVOID*);
179typedef NTSTATUS (NTAPI *PLSA_FREE_CLIENT_BUFFER)(PLSA_CLIENT_REQUEST, PVOID);
180typedef NTSTATUS (NTAPI *PLSA_COPY_TO_CLIENT_BUFFER)(PLSA_CLIENT_REQUEST, ULONG,
181 PVOID, PVOID);
182typedef NTSTATUS (NTAPI *PLSA_COPY_FROM_CLIENT_BUFFER)(PLSA_CLIENT_REQUEST,
183 ULONG, PVOID, PVOID);
184typedef NTSTATUS (NTAPI *PLSA_IMPERSONATE_CLIENT)(void);
185typedef NTSTATUS (NTAPI *PLSA_UNLOAD_PACKAGE)(void);
186typedef NTSTATUS (NTAPI *PLSA_DUPLICATE_HANDLE)(HANDLE, PHANDLE);
187typedef NTSTATUS (NTAPI *PLSA_SAVE_SUPPLEMENTAL_CREDENTIALS)(PLUID, ULONG,
188 PVOID, BOOLEAN);
189typedef HANDLE (NTAPI *PLSA_CREATE_THREAD)(SEC_ATTRS, ULONG, SEC_THREAD_START,
190 PVOID, ULONG, PULONG);
191typedef NTSTATUS (NTAPI *PLSA_GET_CLIENT_INFO)(PSECPKG_CLIENT_INFO);
192typedef HANDLE (NTAPI *PLSA_REGISTER_NOTIFICATION)(SEC_THREAD_START, PVOID,
193 ULONG, ULONG, ULONG, ULONG, HANDLE);
194typedef NTSTATUS (NTAPI *PLSA_CANCEL_NOTIFICATION)(HANDLE);
195typedef NTSTATUS (NTAPI *PLSA_MAP_BUFFER)(PSecBuffer, PSecBuffer);
196typedef NTSTATUS (NTAPI *PLSA_CREATE_TOKEN)(PLUID, PTOKEN_SOURCE,
197 SECURITY_LOGON_TYPE, SECURITY_IMPERSONATION_LEVEL, LSA_TOKEN_INFORMATION_TYPE,
198 PVOID, PTOKEN_GROUPS, PUNICODE_STRING, PUNICODE_STRING, PUNICODE_STRING,
199 PUNICODE_STRING, PHANDLE, PNTSTATUS);
200typedef VOID (NTAPI *PLSA_AUDIT_LOGON)(NTSTATUS, NTSTATUS, PUNICODE_STRING,
201 PUNICODE_STRING, PUNICODE_STRING, OPTIONAL PSID, SECURITY_LOGON_TYPE,
202 PTOKEN_SOURCE, PLUID);
203typedef NTSTATUS (NTAPI *PLSA_CALL_PACKAGE)(PUNICODE_STRING, PVOID, ULONG,
204 PVOID*, PULONG, PNTSTATUS);
205typedef BOOLEAN (NTAPI *PLSA_GET_CALL_INFO)(PSECPKG_CALL_INFO);
206typedef NTSTATUS (NTAPI *PLSA_CALL_PACKAGEEX)(PUNICODE_STRING, PVOID, PVOID,
207 ULONG, PVOID*, PULONG, PNTSTATUS);
208typedef PVOID (NTAPI *PLSA_CREATE_SHARED_MEMORY)(ULONG, ULONG);
209typedef PVOID (NTAPI *PLSA_ALLOCATE_SHARED_MEMORY)(PVOID, ULONG);
210typedef VOID (NTAPI *PLSA_FREE_SHARED_MEMORY)(PVOID, PVOID);
211typedef BOOLEAN (NTAPI *PLSA_DELETE_SHARED_MEMORY)(PVOID);
212typedef NTSTATUS (NTAPI *PLSA_OPEN_SAM_USER)(PUNICODE_STRING, SECPKG_NAME_TYPE,
213 PUNICODE_STRING, BOOLEAN, ULONG, PVOID*);
214typedef NTSTATUS (NTAPI *PLSA_GET_USER_CREDENTIALS)(PVOID, PVOID *, PULONG,
215 PVOID *, PULONG);
216typedef NTSTATUS (NTAPI *PLSA_GET_USER_AUTH_DATA)(PVOID, PUCHAR *, PULONG);
217typedef NTSTATUS (NTAPI *PLSA_CLOSE_SAM_USER)(PVOID);
218typedef NTSTATUS (NTAPI *PLSA_CONVERT_AUTH_DATA_TO_TOKEN)(PVOID, ULONG,
219 SECURITY_IMPERSONATION_LEVEL, PTOKEN_SOURCE, SECURITY_LOGON_TYPE,
220 PUNICODE_STRING, PHANDLE, PLUID, PUNICODE_STRING, PNTSTATUS);
221typedef NTSTATUS (NTAPI *PLSA_CLIENT_CALLBACK)(PCHAR, ULONG_PTR, ULONG_PTR,
222 PSecBuffer, PSecBuffer);
223typedef NTSTATUS (NTAPI *PLSA_UPDATE_PRIMARY_CREDENTIALS)(PSECPKG_PRIMARY_CRED, PSECPKG_SUPPLEMENTAL_CRED_ARRAY);
224typedef NTSTATUS (NTAPI *PLSA_GET_AUTH_DATA_FOR_USER)(PUNICODE_STRING,
225 SECPKG_NAME_TYPE, PUNICODE_STRING, PUCHAR *, PULONG, PUNICODE_STRING);
226typedef NTSTATUS (NTAPI *PLSA_CRACK_SINGLE_NAME)(ULONG, BOOLEAN,
227 PUNICODE_STRING, PUNICODE_STRING, ULONG, PUNICODE_STRING, PUNICODE_STRING,
228 PULONG);
229typedef NTSTATUS (NTAPI *PLSA_AUDIT_ACCOUNT_LOGON)(ULONG, BOOLEAN,
230 PUNICODE_STRING, PUNICODE_STRING, PUNICODE_STRING, NTSTATUS);
231typedef NTSTATUS (NTAPI *PLSA_CALL_PACKAGE_PASSTHROUGH)(PUNICODE_STRING, PVOID,
232 PVOID, ULONG, PVOID*, PULONG, PNTSTATUS);
233
234/* Dispatch tables of functions used by SSP/AP */
235typedef struct SECPKG_DLL_FUNCTIONS {
236 PLSA_ALLOCATE_LSA_HEAP AllocateHeap;
237 PLSA_FREE_LSA_HEAP FreeHeap;
238 PLSA_REGISTER_CALLBACK RegisterCallback;
239} SECPKG_DLL_FUNCTIONS,
240 *PSECPKG_DLL_FUNCTIONS;
241
242typedef struct LSA_DISPATCH_TABLE {
243 PLSA_CREATE_LOGON_SESSION CreateLogonSession;
244 PLSA_DELETE_LOGON_SESSION DeleteLogonSession;
245 PLSA_ADD_CREDENTIAL AddCredential;
246 PLSA_GET_CREDENTIALS GetCredentials;
247 PLSA_DELETE_CREDENTIAL DeleteCredential;
248 PLSA_ALLOCATE_LSA_HEAP AllocateLsaHeap;
249 PLSA_FREE_LSA_HEAP FreeLsaHeap;
250 PLSA_ALLOCATE_CLIENT_BUFFER AllocateClientBuffer;
251 PLSA_FREE_CLIENT_BUFFER FreeClientBuffer;
252 PLSA_COPY_TO_CLIENT_BUFFER CopyToClientBuffer;
253 PLSA_COPY_FROM_CLIENT_BUFFER CopyFromClientBuffer;
254} LSA_DISPATCH_TABLE,
255 *PLSA_DISPATCH_TABLE;
256
257typedef struct _LSA_SECPKG_FUNCTION_TABLE {
258 PLSA_CREATE_LOGON_SESSION CreateLogonSession;
259 PLSA_DELETE_LOGON_SESSION DeleteLogonSession;
260 PLSA_ADD_CREDENTIAL AddCredential;
261 PLSA_GET_CREDENTIALS GetCredentials;
262 PLSA_DELETE_CREDENTIAL DeleteCredential;
263 PLSA_ALLOCATE_LSA_HEAP AllocateLsaHeap;
264 PLSA_FREE_LSA_HEAP FreeLsaHeap;
265 PLSA_ALLOCATE_CLIENT_BUFFER AllocateClientBuffer;
266 PLSA_FREE_CLIENT_BUFFER FreeClientBuffer;
267 PLSA_COPY_TO_CLIENT_BUFFER CopyToClientBuffer;
268 PLSA_COPY_FROM_CLIENT_BUFFER CopyFromClientBuffer;
269 PLSA_IMPERSONATE_CLIENT ImpersonateClient;
270 PLSA_UNLOAD_PACKAGE UnloadPackage;
271 PLSA_DUPLICATE_HANDLE DuplicateHandle;
272 PLSA_SAVE_SUPPLEMENTAL_CREDENTIALS SaveSupplementalCredentials;
273 PLSA_CREATE_THREAD CreateThread;
274 PLSA_GET_CLIENT_INFO GetClientInfo;
275 PLSA_REGISTER_NOTIFICATION RegisterNotification;
276 PLSA_CANCEL_NOTIFICATION CancelNotification;
277 PLSA_MAP_BUFFER MapBuffer;
278 PLSA_CREATE_TOKEN CreateToken;
279 PLSA_AUDIT_LOGON AuditLogon;
280 PLSA_CALL_PACKAGE CallPackage;
281 PLSA_FREE_LSA_HEAP FreeReturnBuffer;
282 PLSA_GET_CALL_INFO GetCallInfo;
283 PLSA_CALL_PACKAGEEX CallPackageEx;
284 PLSA_CREATE_SHARED_MEMORY CreateSharedMemory;
285 PLSA_ALLOCATE_SHARED_MEMORY AllocateSharedMemory;
286 PLSA_FREE_SHARED_MEMORY FreeSharedMemory;
287 PLSA_DELETE_SHARED_MEMORY DeleteSharedMemory;
288 PLSA_OPEN_SAM_USER OpenSamUser;
289 PLSA_GET_USER_CREDENTIALS GetUserCredentials;
290 PLSA_GET_USER_AUTH_DATA GetUserAuthData;
291 PLSA_CLOSE_SAM_USER CloseSamUser;
292 PLSA_CONVERT_AUTH_DATA_TO_TOKEN ConvertAuthDataToToken;
293 PLSA_CLIENT_CALLBACK ClientCallback;
294 PLSA_UPDATE_PRIMARY_CREDENTIALS UpdateCredentials;
295 PLSA_GET_AUTH_DATA_FOR_USER GetAuthDataForUser;
296 PLSA_CRACK_SINGLE_NAME CrackSingleName;
297 PLSA_AUDIT_ACCOUNT_LOGON AuditAccountLogon;
298 PLSA_CALL_PACKAGE_PASSTHROUGH CallPackagePassthrough;
299} LSA_SECPKG_FUNCTION_TABLE,
300 *PLSA_SECPKG_FUNCTION_TABLE;
301
302/* LSA-mode functions implemented by SSP/AP obtainable by a dispatch table */
303typedef NTSTATUS (NTAPI *PLSA_AP_INITIALIZE_PACKAGE)(ULONG, PLSA_DISPATCH_TABLE,
304 PLSA_STRING, PLSA_STRING, PLSA_STRING *);
305typedef NTSTATUS (NTAPI *PLSA_AP_LOGON_USER)(LPWSTR, LPWSTR, LPWSTR, LPWSTR,
306 DWORD, DWORD, PHANDLE);
307typedef NTSTATUS (NTAPI *PLSA_AP_CALL_PACKAGE)(PUNICODE_STRING, PVOID, ULONG,
308 PVOID *, PULONG, PNTSTATUS);
309typedef VOID (NTAPI *PLSA_AP_LOGON_TERMINATED)(PLUID);
310typedef NTSTATUS (NTAPI *PLSA_AP_CALL_PACKAGE_UNTRUSTED)(PLSA_CLIENT_REQUEST,
311 PVOID, PVOID, ULONG, PVOID *, PULONG, PNTSTATUS);
312typedef NTSTATUS (NTAPI *PLSA_AP_CALL_PACKAGE_PASSTHROUGH)(PUNICODE_STRING,
313 PVOID, PVOID, ULONG, PVOID *, PULONG, PNTSTATUS);
314typedef NTSTATUS (NTAPI *PLSA_AP_LOGON_USER_EX)(PLSA_CLIENT_REQUEST,
315 SECURITY_LOGON_TYPE, PVOID, PVOID, ULONG, PVOID *, PULONG, PLUID, PNTSTATUS,
316 PLSA_TOKEN_INFORMATION_TYPE, PVOID *, PUNICODE_STRING *, PUNICODE_STRING *,
317 PUNICODE_STRING *);
318typedef NTSTATUS (NTAPI *PLSA_AP_LOGON_USER_EX2)(PLSA_CLIENT_REQUEST,
319 SECURITY_LOGON_TYPE, PVOID, PVOID, ULONG, PVOID *, PULONG, PLUID, PNTSTATUS,
320 PLSA_TOKEN_INFORMATION_TYPE, PVOID *, PUNICODE_STRING *, PUNICODE_STRING *,
321 PUNICODE_STRING *, PSECPKG_PRIMARY_CRED, PSECPKG_SUPPLEMENTAL_CRED_ARRAY *);
322typedef NTSTATUS (SpInitializeFn)(ULONG_PTR, PSECPKG_PARAMETERS,
323 PLSA_SECPKG_FUNCTION_TABLE);
324typedef NTSTATUS (NTAPI SpShutDownFn)(void);
325typedef NTSTATUS (NTAPI SpGetInfoFn)(PSecPkgInfoW);
326typedef NTSTATUS (NTAPI SpAcceptCredentialsFn)(SECURITY_LOGON_TYPE,
327 PUNICODE_STRING, PSECPKG_PRIMARY_CRED, PSECPKG_SUPPLEMENTAL_CRED);
328typedef NTSTATUS (NTAPI SpAcquireCredentialsHandleFn)(PUNICODE_STRING, ULONG,
329 PLUID, PVOID, PVOID, PVOID, PLSA_SEC_HANDLE, PTimeStamp);
330typedef NTSTATUS (NTAPI SpQueryCredentialsAttributesFn)(LSA_SEC_HANDLE, ULONG,
331 PVOID);
332typedef NTSTATUS (NTAPI SpFreeCredentialsHandleFn)(LSA_SEC_HANDLE);
333typedef NTSTATUS (NTAPI SpSaveCredentialsFn)(LSA_SEC_HANDLE, PSecBuffer);
334typedef NTSTATUS (NTAPI SpGetCredentialsFn)(LSA_SEC_HANDLE, PSecBuffer);
335typedef NTSTATUS (NTAPI SpDeleteCredentialsFn)(LSA_SEC_HANDLE, PSecBuffer);
336typedef NTSTATUS (NTAPI SpInitLsaModeContextFn)(LSA_SEC_HANDLE, LSA_SEC_HANDLE,
337 PUNICODE_STRING, ULONG, ULONG, PSecBufferDesc, PLSA_SEC_HANDLE, PSecBufferDesc,
338 PULONG, PTimeStamp, PBOOLEAN, PSecBuffer);
339typedef NTSTATUS (NTAPI SpAcceptLsaModeContextFn)(LSA_SEC_HANDLE,
340 LSA_SEC_HANDLE, PSecBufferDesc, ULONG, ULONG, PLSA_SEC_HANDLE, PSecBufferDesc,
341 PULONG, PTimeStamp, PBOOLEAN, PSecBuffer);
342typedef NTSTATUS (NTAPI SpDeleteContextFn)(LSA_SEC_HANDLE);
343typedef NTSTATUS (NTAPI SpApplyControlTokenFn)(LSA_SEC_HANDLE, PSecBufferDesc);
344typedef NTSTATUS (NTAPI SpGetUserInfoFn)(PLUID, ULONG, PSecurityUserData *);
345typedef NTSTATUS (NTAPI SpGetExtendedInformationFn)(
346 SECPKG_EXTENDED_INFORMATION_CLASS, PSECPKG_EXTENDED_INFORMATION *);
347typedef NTSTATUS (NTAPI SpQueryContextAttributesFn)(LSA_SEC_HANDLE, ULONG,
348 PVOID);
349typedef NTSTATUS (NTAPI SpAddCredentialsFn)(LSA_SEC_HANDLE, PUNICODE_STRING,
350 PUNICODE_STRING, ULONG, PVOID, PVOID, PVOID, PTimeStamp);
351typedef NTSTATUS (NTAPI SpSetExtendedInformationFn)(
352 SECPKG_EXTENDED_INFORMATION_CLASS, PSECPKG_EXTENDED_INFORMATION);
353typedef NTSTATUS (NTAPI SpSetContextAttributesFn)(LSA_SEC_HANDLE, ULONG, PVOID,
354 ULONG);
355typedef NTSTATUS (NTAPI SpSetCredentialsAttributesFn)(LSA_SEC_HANDLE, ULONG,
356 PVOID, ULONG);
357
358/* User-mode functions implemented by SSP/AP obtainable by a dispatch table */
359typedef NTSTATUS (NTAPI SpInstanceInitFn)(ULONG, PSECPKG_DLL_FUNCTIONS,
360 PVOID *);
361typedef NTSTATUS (NTAPI SpInitUserModeContextFn)(LSA_SEC_HANDLE, PSecBuffer);
362typedef NTSTATUS (NTAPI SpMakeSignatureFn)(LSA_SEC_HANDLE, ULONG,
363 PSecBufferDesc, ULONG);
364typedef NTSTATUS (NTAPI SpVerifySignatureFn)(LSA_SEC_HANDLE, PSecBufferDesc,
365 ULONG, PULONG);
366typedef NTSTATUS (NTAPI SpSealMessageFn)(LSA_SEC_HANDLE, ULONG, PSecBufferDesc,
367 ULONG);
368typedef NTSTATUS (NTAPI SpUnsealMessageFn)(LSA_SEC_HANDLE, PSecBufferDesc,
369 ULONG, PULONG);
370typedef NTSTATUS (NTAPI SpGetContextTokenFn)(LSA_SEC_HANDLE, PHANDLE);
371typedef NTSTATUS (NTAPI SpCompleteAuthTokenFn)(LSA_SEC_HANDLE, PSecBufferDesc);
372typedef NTSTATUS (NTAPI SpFormatCredentialsFn)(PSecBuffer, PSecBuffer);
373typedef NTSTATUS (NTAPI SpMarshallSupplementalCredsFn)(ULONG, PUCHAR, PULONG,
374 PVOID *);
375typedef NTSTATUS (NTAPI SpExportSecurityContextFn)(LSA_SEC_HANDLE, ULONG,
376 PSecBuffer, PHANDLE);
377typedef NTSTATUS (NTAPI SpImportSecurityContextFn)(PSecBuffer, HANDLE,
378 PLSA_SEC_HANDLE);
379
380#ifdef WINE_NO_UNICODE_MACROS
381#undef SetContextAttributes
382#endif
383
384/* dispatch tables of LSA-mode functions implemented by SSP/AP */
385typedef struct SECPKG_FUNCTION_TABLE {
386 PLSA_AP_INITIALIZE_PACKAGE InitializePackage;
387 PLSA_AP_LOGON_USER LsaLogonUser;
388 PLSA_AP_CALL_PACKAGE CallPackage;
389 PLSA_AP_LOGON_TERMINATED LogonTerminated;
390 PLSA_AP_CALL_PACKAGE_UNTRUSTED CallPackageUntrusted;
391 PLSA_AP_CALL_PACKAGE_PASSTHROUGH CallPackagePassthrough;
392 PLSA_AP_LOGON_USER_EX LogonUserEx;
393 PLSA_AP_LOGON_USER_EX2 LogonUserEx2;
394 SpInitializeFn *Initialize;
395 SpShutDownFn *Shutdown;
396 SpGetInfoFn *GetInfo;
397 SpAcceptCredentialsFn *AcceptCredentials;
398 SpAcquireCredentialsHandleFn *SpAcquireCredentialsHandle;
399 SpQueryCredentialsAttributesFn *SpQueryCredentialsAttributes;
400 SpFreeCredentialsHandleFn *FreeCredentialsHandle;
401 SpSaveCredentialsFn *SaveCredentials;
402 SpGetCredentialsFn *GetCredentials;
403 SpDeleteCredentialsFn *DeleteCredentials;
404 SpInitLsaModeContextFn *InitLsaModeContext;
405 SpAcceptLsaModeContextFn *AcceptLsaModeContext;
406 SpDeleteContextFn *DeleteContext;
407 SpApplyControlTokenFn *ApplyControlToken;
408 SpGetUserInfoFn *GetUserInfo;
409 SpGetExtendedInformationFn *GetExtendedInformation;
410 SpQueryContextAttributesFn *SpQueryContextAttributes;
411 SpAddCredentialsFn *SpAddCredentials;
412 SpSetExtendedInformationFn *SetExtendedInformation;
413 /* Packages with version SECPKG_INTERFACE_VERSION end here */
414 SpSetContextAttributesFn *SetContextAttributes;
415 /* Packages with version SECPKG_INTERFACE_VERSION_2 end here */
416 SpSetCredentialsAttributesFn *SetCredentialsAttributes;
417 /* Packages with version SECPKG_INTERFACE_VERSION_3 end here */
418} SECPKG_FUNCTION_TABLE,
419 *PSECPKG_FUNCTION_TABLE;
420
421/* dispatch tables of user-mode functions implemented by SSP/AP */
422typedef struct SECPKG_USER_FUNCTION_TABLE {
423 SpInstanceInitFn *InstanceInit;
424 SpInitUserModeContextFn *InitUserModeContext;
425 SpMakeSignatureFn *MakeSignature;
426 SpVerifySignatureFn *VerifySignature;
427 SpSealMessageFn *SealMessage;
428 SpUnsealMessageFn *UnsealMessage;
429 SpGetContextTokenFn *GetContextToken;
430 SpQueryContextAttributesFn *SpQueryContextAttributes;
431 SpCompleteAuthTokenFn *CompleteAuthToken;
432 SpDeleteContextFn *DeleteUserModeContext;
433 SpFormatCredentialsFn *FormatCredentials;
434 SpMarshallSupplementalCredsFn *MarshallSupplementalCreds;
435 SpExportSecurityContextFn *ExportContext;
436 SpImportSecurityContextFn *ImportContext;
437} SECPKG_USER_FUNCTION_TABLE,
438 *PSECPKG_USER_FUNCTION_TABLE;
439
440/* LSA-mode entry point to SSP/APs */
441typedef NTSTATUS (NTAPI *SpLsaModeInitializeFn)(ULONG, PULONG,
442 PSECPKG_FUNCTION_TABLE *, PULONG);
443
444/* User-mode entry point to SSP/APs */
445typedef NTSTATUS (WINAPI *SpUserModeInitializeFn)(ULONG, PULONG,
446 PSECPKG_USER_FUNCTION_TABLE *, PULONG);
447
448#ifdef __cplusplus
449}
450#endif
451#endif /* _NTSECPKG_H */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette