xref: /reactos/sdk/include/psdk/ntsecpkg.h (revision ae0bc81a)
1c2c66affSColin Finck /*
2c2c66affSColin Finck  * Copyright (C) 2007 Yuval Fledel
3c2c66affSColin Finck  *
4c2c66affSColin Finck  * This library is free software; you can redistribute it and/or
5c2c66affSColin Finck  * modify it under the terms of the GNU Lesser General Public
6c2c66affSColin Finck  * License as published by the Free Software Foundation; either
7c2c66affSColin Finck  * version 2.1 of the License, or (at your option) any later version.
8c2c66affSColin Finck  *
9c2c66affSColin Finck  * This library is distributed in the hope that it will be useful,
10c2c66affSColin Finck  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11c2c66affSColin Finck  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12c2c66affSColin Finck  * Lesser General Public License for more details.
13c2c66affSColin Finck  *
14c2c66affSColin Finck  * You should have received a copy of the GNU Lesser General Public
15c2c66affSColin Finck  * License along with this library; if not, write to the Free Software
16c2c66affSColin Finck  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17c2c66affSColin Finck  */
18c2c66affSColin Finck 
19c2c66affSColin Finck #ifndef _NTSECPKG_H
20c2c66affSColin Finck #define _NTSECPKG_H
21c2c66affSColin Finck 
22c2c66affSColin Finck #ifdef __cplusplus
23c2c66affSColin Finck extern "C" {
24c2c66affSColin Finck #endif
25c2c66affSColin Finck 
26c2c66affSColin Finck /* Flags for the MachineState field in SECPKG_PARAMETERS */
27c2c66affSColin Finck #define SECPKG_STATE_ENCRYPTION_PERMITTED               0x01
28c2c66affSColin Finck #define SECPKG_STATE_STRONG_ENCRYPTION_PERMITTED        0x02
29c2c66affSColin Finck #define SECPKG_STATE_DOMAIN_CONTROLLER                  0x04
30c2c66affSColin Finck #define SECPKG_STATE_WORKSTATION                        0x08
31c2c66affSColin Finck #define SECPKG_STATE_STANDALONE                         0x10
32c2c66affSColin Finck 
33c2c66affSColin Finck /* Version magics as passed to or returned from Sp[Lsa,Mode]ModeInitialize */
34c2c66affSColin Finck #define SECPKG_INTERFACE_VERSION                     0x10000
35c2c66affSColin Finck #define SECPKG_INTERFACE_VERSION_2                   0x20000
36c2c66affSColin Finck #define SECPKG_INTERFACE_VERSION_3                   0x40000
37c2c66affSColin Finck #define SECPKG_INTERFACE_VERSION_4                   0x80000
38c2c66affSColin Finck #define SECPKG_INTERFACE_VERSION_5                  0x100000
39c2c66affSColin Finck #define SECPKG_INTERFACE_VERSION_6                  0x200000
40c2c66affSColin Finck #define SECPKG_INTERFACE_VERSION_7                  0x400000
41c2c66affSColin Finck 
42c2c66affSColin Finck /* enum definitions for Secure Service Provider/Authentication Packages */
43c2c66affSColin Finck typedef enum _LSA_TOKEN_INFORMATION_TYPE {
44c2c66affSColin Finck     LsaTokenInformationNull,
453cdb717aSHermès Bélusca-Maïto     LsaTokenInformationV1,
463cdb717aSHermès Bélusca-Maïto     LsaTokenInformationV2
47c2c66affSColin Finck } LSA_TOKEN_INFORMATION_TYPE, *PLSA_TOKEN_INFORMATION_TYPE;
48c2c66affSColin Finck 
49c2c66affSColin Finck typedef enum _SECPKG_EXTENDED_INFORMATION_CLASS
50c2c66affSColin Finck {
51c2c66affSColin Finck     SecpkgGssInfo = 1,
52c2c66affSColin Finck     SecpkgContextThunks,
53c2c66affSColin Finck     SecpkgMutualAuthLevel,
5411fe17c3SAndreas Maier     SecpkgWowClientDll,
5511fe17c3SAndreas Maier     SecpkgExtraOids,
56c2c66affSColin Finck     SecpkgMaxInfo
57c2c66affSColin Finck } SECPKG_EXTENDED_INFORMATION_CLASS;
58c2c66affSColin Finck 
59c2c66affSColin Finck typedef enum _SECPKG_NAME_TYPE {
60c2c66affSColin Finck     SecNameSamCompatible,
61c2c66affSColin Finck     SecNameAlternateId,
62c2c66affSColin Finck     SecNameFlat,
63c2c66affSColin Finck     SecNameDN
64c2c66affSColin Finck } SECPKG_NAME_TYPE;
65c2c66affSColin Finck 
66c2c66affSColin Finck /* struct definitions for SSP/AP */
67c2c66affSColin Finck typedef struct _LSA_TOKEN_INFORMATION_NULL
68c2c66affSColin Finck {
69c2c66affSColin Finck     LARGE_INTEGER ExpirationTime;
70c2c66affSColin Finck     PTOKEN_GROUPS Groups;
71c2c66affSColin Finck } LSA_TOKEN_INFORMATION_NULL, *PLSA_TOKEN_INFORMATION_NULL;
72c2c66affSColin Finck 
73c2c66affSColin Finck typedef struct _LSA_TOKEN_INFORMATION_V1
74c2c66affSColin Finck {
75c2c66affSColin Finck     LARGE_INTEGER ExpirationTime;
76c2c66affSColin Finck     TOKEN_USER User;
77c2c66affSColin Finck     PTOKEN_GROUPS Groups;
78c2c66affSColin Finck     TOKEN_PRIMARY_GROUP PrimaryGroup;
79c2c66affSColin Finck     PTOKEN_PRIVILEGES Privileges;
80c2c66affSColin Finck     TOKEN_OWNER Owner;
81c2c66affSColin Finck     TOKEN_DEFAULT_DACL DefaultDacl;
82c2c66affSColin Finck } LSA_TOKEN_INFORMATION_V1, *PLSA_TOKEN_INFORMATION_V1;
83c2c66affSColin Finck 
843cdb717aSHermès Bélusca-Maïto typedef LSA_TOKEN_INFORMATION_V1 LSA_TOKEN_INFORMATION_V2, *PLSA_TOKEN_INFORMATION_V2;
853cdb717aSHermès Bélusca-Maïto 
86c2c66affSColin Finck typedef struct _SECPKG_PRIMARY_CRED {
87c2c66affSColin Finck     LUID LogonId;
88c2c66affSColin Finck     UNICODE_STRING DownlevelName;
89c2c66affSColin Finck     UNICODE_STRING DomainName;
90c2c66affSColin Finck     UNICODE_STRING Password;
91c2c66affSColin Finck     UNICODE_STRING OldPassword;
92c2c66affSColin Finck     PSID UserSid;
93c2c66affSColin Finck     ULONG Flags;
94c2c66affSColin Finck     UNICODE_STRING DnsDomainName;
95c2c66affSColin Finck     UNICODE_STRING Upn;
96c2c66affSColin Finck     UNICODE_STRING LogonServer;
97c2c66affSColin Finck     UNICODE_STRING Spare1;
98c2c66affSColin Finck     UNICODE_STRING Spare2;
99c2c66affSColin Finck     UNICODE_STRING Spare3;
100c2c66affSColin Finck     UNICODE_STRING Spare4;
101c2c66affSColin Finck } SECPKG_PRIMARY_CRED, *PSECPKG_PRIMARY_CRED;
102c2c66affSColin Finck 
103c2c66affSColin Finck typedef struct _SECPKG_SUPPLEMENTAL_CRED {
104c2c66affSColin Finck     UNICODE_STRING PackageName;
105c2c66affSColin Finck     ULONG CredentialSize;
106c2c66affSColin Finck     PUCHAR Credentials;
107c2c66affSColin Finck } SECPKG_SUPPLEMENTAL_CRED, *PSECPKG_SUPPLEMENTAL_CRED;
108c2c66affSColin Finck 
109c2c66affSColin Finck typedef struct _SECPKG_SUPPLEMENTAL_CRED_ARRAY {
110c2c66affSColin Finck     ULONG CredentialCount;
111c2c66affSColin Finck     SECPKG_SUPPLEMENTAL_CRED Credentials[1];
112c2c66affSColin Finck } SECPKG_SUPPLEMENTAL_CRED_ARRAY, *PSECPKG_SUPPLEMENTAL_CRED_ARRAY;
113c2c66affSColin Finck 
114c2c66affSColin Finck typedef struct _SECPKG_PARAMETERS {
115c2c66affSColin Finck     ULONG Version;
116c2c66affSColin Finck     ULONG MachineState;
117c2c66affSColin Finck     ULONG SetupMode;
118c2c66affSColin Finck     PSID DomainSid;
119c2c66affSColin Finck     UNICODE_STRING DomainName;
120c2c66affSColin Finck     UNICODE_STRING DnsDomainName;
121c2c66affSColin Finck     GUID DomainGuid;
122c2c66affSColin Finck } SECPKG_PARAMETERS, *PSECPKG_PARAMETERS,
123c2c66affSColin Finck   SECPKG_EVENT_DOMAIN_CHANGE, *PSECPKG_EVENT_DOMAIN_CHANGE;
124c2c66affSColin Finck 
125c2c66affSColin Finck typedef struct _SECPKG_CLIENT_INFO {
126c2c66affSColin Finck     LUID LogonId;
127c2c66affSColin Finck     ULONG ProcessID;
128c2c66affSColin Finck     ULONG ThreadID;
129c2c66affSColin Finck     BOOLEAN HasTcbPrivilege;
130c2c66affSColin Finck     BOOLEAN Impersonating;
131c2c66affSColin Finck     BOOLEAN Restricted;
132c2c66affSColin Finck } SECPKG_CLIENT_INFO,
133c2c66affSColin Finck  *PSECPKG_CLIENT_INFO;
134c2c66affSColin Finck 
135c2c66affSColin Finck typedef struct _SECURITY_USER_DATA {
13611fe17c3SAndreas Maier     SECURITY_STRING UserName;
13711fe17c3SAndreas Maier     SECURITY_STRING LogonDomainName;
13811fe17c3SAndreas Maier     SECURITY_STRING LogonServer;
139c2c66affSColin Finck     PSID pSid;
140c2c66affSColin Finck } SECURITY_USER_DATA, *PSECURITY_USER_DATA,
141c2c66affSColin Finck   SecurityUserData, *PSecurityUserData;
142c2c66affSColin Finck 
143c2c66affSColin Finck typedef struct _SECPKG_GSS_INFO {
144c2c66affSColin Finck     ULONG EncodedIdLength;
145c2c66affSColin Finck     UCHAR EncodedId[4];
146c2c66affSColin Finck } SECPKG_GSS_INFO, *PSECPKG_GSS_INFO;
147c2c66affSColin Finck 
148c2c66affSColin Finck typedef struct _SECPKG_CONTEXT_THUNKS {
149c2c66affSColin Finck     ULONG InfoLevelCount;
150c2c66affSColin Finck     ULONG Levels[1];
151c2c66affSColin Finck } SECPKG_CONTEXT_THUNKS, *PSECPKG_CONTEXT_THUNKS;
152c2c66affSColin Finck 
153c2c66affSColin Finck typedef struct _SECPKG_MUTUAL_AUTH_LEVEL {
154c2c66affSColin Finck     ULONG MutualAuthLevel;
155c2c66affSColin Finck } SECPKG_MUTUAL_AUTH_LEVEL, *PSECPKG_MUTUAL_AUTH_LEVEL;
156c2c66affSColin Finck 
15711fe17c3SAndreas Maier typedef struct _SECPKG_WOW_CLIENT_DLL {
15811fe17c3SAndreas Maier     SECURITY_STRING WowClientDllPath;
15911fe17c3SAndreas Maier } SECPKG_WOW_CLIENT_DLL, *PSECPKG_WOW_CLIENT_DLL;
16011fe17c3SAndreas Maier 
16111fe17c3SAndreas Maier #define SECPKG_MAX_OID_LENGTH 32
16211fe17c3SAndreas Maier typedef struct _SECPKG_SERIALIZED_OID {
16311fe17c3SAndreas Maier     ULONG OidLength;
16411fe17c3SAndreas Maier     ULONG OidAttributes;
16511fe17c3SAndreas Maier     UCHAR OidValue[SECPKG_MAX_OID_LENGTH];
16611fe17c3SAndreas Maier } SECPKG_SERIALIZED_OID, *PSECPKG_SERIALIZED_OID;
16711fe17c3SAndreas Maier 
16811fe17c3SAndreas Maier typedef struct _SECPKG_EXTRA_OIDS {
16911fe17c3SAndreas Maier     ULONG OidCount;
17011fe17c3SAndreas Maier     SECPKG_SERIALIZED_OID Oids[1];
17111fe17c3SAndreas Maier } SECPKG_EXTRA_OIDS, *PSECPKG_EXTRA_OIDS;
17211fe17c3SAndreas Maier 
173c2c66affSColin Finck typedef struct _SECPKG_CALL_INFO {
174c2c66affSColin Finck     ULONG ProcessId;
175c2c66affSColin Finck     ULONG ThreadId;
176c2c66affSColin Finck     ULONG Attributes;
177c2c66affSColin Finck     ULONG CallCount;
178c2c66affSColin Finck } SECPKG_CALL_INFO, *PSECPKG_CALL_INFO;
179c2c66affSColin Finck 
180c2c66affSColin Finck typedef struct _SECPKG_EXTENDED_INFORMATION {
181c2c66affSColin Finck     SECPKG_EXTENDED_INFORMATION_CLASS Class;
182c2c66affSColin Finck     union {
183c2c66affSColin Finck         SECPKG_GSS_INFO GssInfo;
184c2c66affSColin Finck         SECPKG_CONTEXT_THUNKS ContextThunks;
185c2c66affSColin Finck         SECPKG_MUTUAL_AUTH_LEVEL MutualAuthLevel;
18611fe17c3SAndreas Maier         SECPKG_WOW_CLIENT_DLL WowClientDll;
18711fe17c3SAndreas Maier         SECPKG_EXTRA_OIDS ExtraOids;
188c2c66affSColin Finck     } Info;
189c2c66affSColin Finck } SECPKG_EXTENDED_INFORMATION, *PSECPKG_EXTENDED_INFORMATION;
190c2c66affSColin Finck 
191c2c66affSColin Finck typedef struct _SECPKG_TARGETINFO {
192c2c66affSColin Finck     PSID DomainSid;
193c2c66affSColin Finck     PCWSTR ComputerName;
194c2c66affSColin Finck } SECPKG_TARGETINFO, *PSECPKG_TARGETINFO;
195c2c66affSColin Finck 
196c2c66affSColin Finck typedef struct _SECPKG_POST_LOGON_USER_INFO {
197c2c66affSColin Finck     ULONG Flags;
198c2c66affSColin Finck     LUID LogonId;
199c2c66affSColin Finck     LUID LinkedLogonId;
200c2c66affSColin Finck } SECPKG_POST_LOGON_USER_INFO, *PSECPKG_POST_LOGON_USER_INFO;
201c2c66affSColin Finck 
202c2c66affSColin Finck /* callbacks implemented by SSP/AP dlls and called by the LSA */
203c2c66affSColin Finck typedef VOID (NTAPI *PLSA_CALLBACK_FUNCTION)(ULONG_PTR, ULONG_PTR, PSecBuffer,
204c2c66affSColin Finck  PSecBuffer);
205c2c66affSColin Finck 
206c2c66affSColin Finck /* misc typedefs used in the below prototypes */
207c2c66affSColin Finck typedef PVOID *PLSA_CLIENT_REQUEST;
208c2c66affSColin Finck typedef ULONG LSA_SEC_HANDLE, *PLSA_SEC_HANDLE;
209c2c66affSColin Finck typedef LPTHREAD_START_ROUTINE SEC_THREAD_START;
210c2c66affSColin Finck typedef PSECURITY_ATTRIBUTES SEC_ATTRS;
211c2c66affSColin Finck 
212c2c66affSColin Finck /* functions used by SSP/AP obtainable by dispatch tables */
213c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_REGISTER_CALLBACK)(ULONG, PLSA_CALLBACK_FUNCTION);
214c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_CREATE_LOGON_SESSION)(PLUID);
215c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_DELETE_LOGON_SESSION)(PLUID);
216c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_ADD_CREDENTIAL)(PLUID, ULONG, PLSA_STRING,
217c2c66affSColin Finck  PLSA_STRING);
218c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_GET_CREDENTIALS)(PLUID, ULONG, PULONG, BOOLEAN,
219c2c66affSColin Finck  PLSA_STRING, PULONG, PLSA_STRING);
220c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_DELETE_CREDENTIAL)(PLUID, ULONG, PLSA_STRING);
221c2c66affSColin Finck typedef PVOID (NTAPI *PLSA_ALLOCATE_LSA_HEAP)(ULONG);
222c2c66affSColin Finck typedef VOID (NTAPI *PLSA_FREE_LSA_HEAP)(PVOID);
223c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_ALLOCATE_CLIENT_BUFFER)(PLSA_CLIENT_REQUEST,
224c2c66affSColin Finck  ULONG, PVOID*);
225c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_FREE_CLIENT_BUFFER)(PLSA_CLIENT_REQUEST, PVOID);
226c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_COPY_TO_CLIENT_BUFFER)(PLSA_CLIENT_REQUEST, ULONG,
227c2c66affSColin Finck  PVOID, PVOID);
228c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_COPY_FROM_CLIENT_BUFFER)(PLSA_CLIENT_REQUEST,
229c2c66affSColin Finck  ULONG, PVOID, PVOID);
230c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_IMPERSONATE_CLIENT)(void);
231c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_UNLOAD_PACKAGE)(void);
232c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_DUPLICATE_HANDLE)(HANDLE, PHANDLE);
233c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_SAVE_SUPPLEMENTAL_CREDENTIALS)(PLUID, ULONG,
234c2c66affSColin Finck  PVOID, BOOLEAN);
235c2c66affSColin Finck typedef HANDLE (NTAPI *PLSA_CREATE_THREAD)(SEC_ATTRS, ULONG, SEC_THREAD_START,
236c2c66affSColin Finck  PVOID, ULONG, PULONG);
237c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_GET_CLIENT_INFO)(PSECPKG_CLIENT_INFO);
238c2c66affSColin Finck typedef HANDLE (NTAPI *PLSA_REGISTER_NOTIFICATION)(SEC_THREAD_START, PVOID,
239c2c66affSColin Finck  ULONG, ULONG, ULONG, ULONG, HANDLE);
240c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_CANCEL_NOTIFICATION)(HANDLE);
241c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_MAP_BUFFER)(PSecBuffer, PSecBuffer);
242c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_CREATE_TOKEN)(PLUID, PTOKEN_SOURCE,
243c2c66affSColin Finck  SECURITY_LOGON_TYPE, SECURITY_IMPERSONATION_LEVEL, LSA_TOKEN_INFORMATION_TYPE,
244c2c66affSColin Finck  PVOID, PTOKEN_GROUPS, PUNICODE_STRING, PUNICODE_STRING, PUNICODE_STRING,
245c2c66affSColin Finck  PUNICODE_STRING, PHANDLE, PNTSTATUS);
246c2c66affSColin Finck typedef VOID (NTAPI *PLSA_AUDIT_LOGON)(NTSTATUS, NTSTATUS, PUNICODE_STRING,
247c2c66affSColin Finck  PUNICODE_STRING, PUNICODE_STRING, OPTIONAL PSID, SECURITY_LOGON_TYPE,
248c2c66affSColin Finck  PTOKEN_SOURCE, PLUID);
249c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_CALL_PACKAGE)(PUNICODE_STRING, PVOID, ULONG,
250c2c66affSColin Finck  PVOID*, PULONG, PNTSTATUS);
251c2c66affSColin Finck typedef BOOLEAN (NTAPI *PLSA_GET_CALL_INFO)(PSECPKG_CALL_INFO);
252c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_CALL_PACKAGEEX)(PUNICODE_STRING, PVOID, PVOID,
253c2c66affSColin Finck  ULONG, PVOID*, PULONG, PNTSTATUS);
254c2c66affSColin Finck typedef PVOID (NTAPI *PLSA_CREATE_SHARED_MEMORY)(ULONG, ULONG);
255c2c66affSColin Finck typedef PVOID (NTAPI *PLSA_ALLOCATE_SHARED_MEMORY)(PVOID, ULONG);
256c2c66affSColin Finck typedef VOID (NTAPI *PLSA_FREE_SHARED_MEMORY)(PVOID, PVOID);
257c2c66affSColin Finck typedef BOOLEAN (NTAPI *PLSA_DELETE_SHARED_MEMORY)(PVOID);
25811fe17c3SAndreas Maier typedef NTSTATUS (NTAPI *PLSA_OPEN_SAM_USER)(PSECURITY_STRING, SECPKG_NAME_TYPE,
25911fe17c3SAndreas Maier  PSECURITY_STRING, BOOLEAN, ULONG, PVOID*);
260c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_GET_USER_CREDENTIALS)(PVOID, PVOID *, PULONG,
261c2c66affSColin Finck  PVOID *, PULONG);
262c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_GET_USER_AUTH_DATA)(PVOID, PUCHAR *, PULONG);
263c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_CLOSE_SAM_USER)(PVOID);
264c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_CONVERT_AUTH_DATA_TO_TOKEN)(PVOID, ULONG,
265c2c66affSColin Finck  SECURITY_IMPERSONATION_LEVEL, PTOKEN_SOURCE, SECURITY_LOGON_TYPE,
266c2c66affSColin Finck  PUNICODE_STRING, PHANDLE, PLUID, PUNICODE_STRING, PNTSTATUS);
267c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_CLIENT_CALLBACK)(PCHAR, ULONG_PTR, ULONG_PTR,
268c2c66affSColin Finck  PSecBuffer, PSecBuffer);
269c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_UPDATE_PRIMARY_CREDENTIALS)(PSECPKG_PRIMARY_CRED, PSECPKG_SUPPLEMENTAL_CRED_ARRAY);
27011fe17c3SAndreas Maier typedef NTSTATUS (NTAPI *PLSA_GET_AUTH_DATA_FOR_USER)(PSECURITY_STRING,
27111fe17c3SAndreas Maier  SECPKG_NAME_TYPE, PSECURITY_STRING, PUCHAR *, PULONG, PUNICODE_STRING);
272c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_CRACK_SINGLE_NAME)(ULONG, BOOLEAN,
273c2c66affSColin Finck  PUNICODE_STRING, PUNICODE_STRING, ULONG, PUNICODE_STRING, PUNICODE_STRING,
274c2c66affSColin Finck  PULONG);
275c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_AUDIT_ACCOUNT_LOGON)(ULONG, BOOLEAN,
276c2c66affSColin Finck  PUNICODE_STRING, PUNICODE_STRING, PUNICODE_STRING, NTSTATUS);
277c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_CALL_PACKAGE_PASSTHROUGH)(PUNICODE_STRING, PVOID,
278c2c66affSColin Finck  PVOID, ULONG, PVOID*, PULONG, PNTSTATUS);
27911fe17c3SAndreas Maier typedef VOID (NTAPI *PLSA_PROTECT_MEMORY)(PVOID, ULONG);
28011fe17c3SAndreas Maier typedef NTSTATUS (NTAPI *PLSA_OPEN_TOKEN_BY_LOGON_ID)(PLUID, HANDLE *);
28111fe17c3SAndreas Maier typedef NTSTATUS (NTAPI *PLSA_EXPAND_AUTH_DATA_FOR_DOMAIN)(PUCHAR, ULONG, PVOID, PUCHAR *, PULONG);
28211fe17c3SAndreas Maier typedef PVOID (NTAPI *PLSA_ALLOCATE_PRIVATE_HEAP)(SIZE_T);
28311fe17c3SAndreas Maier typedef VOID (NTAPI *PLSA_FREE_PRIVATE_HEAP)(PVOID);
284c2c66affSColin Finck 
285c2c66affSColin Finck /* Dispatch tables of functions used by SSP/AP */
2863cdb717aSHermès Bélusca-Maïto typedef struct _SECPKG_DLL_FUNCTIONS {
287c2c66affSColin Finck     PLSA_ALLOCATE_LSA_HEAP AllocateHeap;
288c2c66affSColin Finck     PLSA_FREE_LSA_HEAP FreeHeap;
289c2c66affSColin Finck     PLSA_REGISTER_CALLBACK RegisterCallback;
290c2c66affSColin Finck } SECPKG_DLL_FUNCTIONS,
291c2c66affSColin Finck  *PSECPKG_DLL_FUNCTIONS;
292c2c66affSColin Finck 
2933cdb717aSHermès Bélusca-Maïto typedef struct _LSA_DISPATCH_TABLE {
294c2c66affSColin Finck     PLSA_CREATE_LOGON_SESSION CreateLogonSession;
295c2c66affSColin Finck     PLSA_DELETE_LOGON_SESSION DeleteLogonSession;
296c2c66affSColin Finck     PLSA_ADD_CREDENTIAL AddCredential;
297c2c66affSColin Finck     PLSA_GET_CREDENTIALS GetCredentials;
298c2c66affSColin Finck     PLSA_DELETE_CREDENTIAL DeleteCredential;
299c2c66affSColin Finck     PLSA_ALLOCATE_LSA_HEAP AllocateLsaHeap;
300c2c66affSColin Finck     PLSA_FREE_LSA_HEAP FreeLsaHeap;
301c2c66affSColin Finck     PLSA_ALLOCATE_CLIENT_BUFFER AllocateClientBuffer;
302c2c66affSColin Finck     PLSA_FREE_CLIENT_BUFFER FreeClientBuffer;
303c2c66affSColin Finck     PLSA_COPY_TO_CLIENT_BUFFER CopyToClientBuffer;
304c2c66affSColin Finck     PLSA_COPY_FROM_CLIENT_BUFFER CopyFromClientBuffer;
305c2c66affSColin Finck } LSA_DISPATCH_TABLE,
306c2c66affSColin Finck  *PLSA_DISPATCH_TABLE;
307c2c66affSColin Finck 
308c2c66affSColin Finck typedef struct _LSA_SECPKG_FUNCTION_TABLE {
309c2c66affSColin Finck     PLSA_CREATE_LOGON_SESSION CreateLogonSession;
310c2c66affSColin Finck     PLSA_DELETE_LOGON_SESSION DeleteLogonSession;
311c2c66affSColin Finck     PLSA_ADD_CREDENTIAL AddCredential;
312c2c66affSColin Finck     PLSA_GET_CREDENTIALS GetCredentials;
313c2c66affSColin Finck     PLSA_DELETE_CREDENTIAL DeleteCredential;
314c2c66affSColin Finck     PLSA_ALLOCATE_LSA_HEAP AllocateLsaHeap;
315c2c66affSColin Finck     PLSA_FREE_LSA_HEAP FreeLsaHeap;
316c2c66affSColin Finck     PLSA_ALLOCATE_CLIENT_BUFFER AllocateClientBuffer;
317c2c66affSColin Finck     PLSA_FREE_CLIENT_BUFFER FreeClientBuffer;
318c2c66affSColin Finck     PLSA_COPY_TO_CLIENT_BUFFER CopyToClientBuffer;
319c2c66affSColin Finck     PLSA_COPY_FROM_CLIENT_BUFFER CopyFromClientBuffer;
320c2c66affSColin Finck     PLSA_IMPERSONATE_CLIENT ImpersonateClient;
321c2c66affSColin Finck     PLSA_UNLOAD_PACKAGE UnloadPackage;
322c2c66affSColin Finck     PLSA_DUPLICATE_HANDLE DuplicateHandle;
323c2c66affSColin Finck     PLSA_SAVE_SUPPLEMENTAL_CREDENTIALS SaveSupplementalCredentials;
324c2c66affSColin Finck     PLSA_CREATE_THREAD CreateThread;
325c2c66affSColin Finck     PLSA_GET_CLIENT_INFO GetClientInfo;
326c2c66affSColin Finck     PLSA_REGISTER_NOTIFICATION RegisterNotification;
327c2c66affSColin Finck     PLSA_CANCEL_NOTIFICATION CancelNotification;
328c2c66affSColin Finck     PLSA_MAP_BUFFER MapBuffer;
329c2c66affSColin Finck     PLSA_CREATE_TOKEN CreateToken;
330c2c66affSColin Finck     PLSA_AUDIT_LOGON AuditLogon;
331c2c66affSColin Finck     PLSA_CALL_PACKAGE CallPackage;
332c2c66affSColin Finck     PLSA_FREE_LSA_HEAP FreeReturnBuffer;
333c2c66affSColin Finck     PLSA_GET_CALL_INFO GetCallInfo;
334c2c66affSColin Finck     PLSA_CALL_PACKAGEEX CallPackageEx;
335c2c66affSColin Finck     PLSA_CREATE_SHARED_MEMORY CreateSharedMemory;
336c2c66affSColin Finck     PLSA_ALLOCATE_SHARED_MEMORY AllocateSharedMemory;
337c2c66affSColin Finck     PLSA_FREE_SHARED_MEMORY FreeSharedMemory;
338c2c66affSColin Finck     PLSA_DELETE_SHARED_MEMORY DeleteSharedMemory;
339c2c66affSColin Finck     PLSA_OPEN_SAM_USER OpenSamUser;
340c2c66affSColin Finck     PLSA_GET_USER_CREDENTIALS GetUserCredentials;
341c2c66affSColin Finck     PLSA_GET_USER_AUTH_DATA GetUserAuthData;
342c2c66affSColin Finck     PLSA_CLOSE_SAM_USER CloseSamUser;
343c2c66affSColin Finck     PLSA_CONVERT_AUTH_DATA_TO_TOKEN ConvertAuthDataToToken;
344c2c66affSColin Finck     PLSA_CLIENT_CALLBACK ClientCallback;
345c2c66affSColin Finck     PLSA_UPDATE_PRIMARY_CREDENTIALS UpdateCredentials;
346c2c66affSColin Finck     PLSA_GET_AUTH_DATA_FOR_USER GetAuthDataForUser;
347c2c66affSColin Finck     PLSA_CRACK_SINGLE_NAME CrackSingleName;
348c2c66affSColin Finck     PLSA_AUDIT_ACCOUNT_LOGON AuditAccountLogon;
349c2c66affSColin Finck     PLSA_CALL_PACKAGE_PASSTHROUGH CallPackagePassthrough;
35011fe17c3SAndreas Maier #ifdef _WINCRED_H_
35111fe17c3SAndreas Maier     CredReadFn *CrediRead;
35211fe17c3SAndreas Maier     CredReadDomainCredentialsFn *CrediReadDomainCredentials;
35311fe17c3SAndreas Maier     CredFreeCredentialsFn *CrediFreeCredentials;
35411fe17c3SAndreas Maier #else
35511fe17c3SAndreas Maier     PLSA_PROTECT_MEMORY DummyFunction1;
35611fe17c3SAndreas Maier     PLSA_PROTECT_MEMORY DummyFunction2;
35711fe17c3SAndreas Maier     PLSA_PROTECT_MEMORY DummyFunction3;
35811fe17c3SAndreas Maier #endif
35911fe17c3SAndreas Maier     PLSA_PROTECT_MEMORY LsaProtectMemory;
36011fe17c3SAndreas Maier     PLSA_PROTECT_MEMORY LsaUnprotectMemory;
36111fe17c3SAndreas Maier     PLSA_OPEN_TOKEN_BY_LOGON_ID OpenTokenByLogonId;
36211fe17c3SAndreas Maier     PLSA_EXPAND_AUTH_DATA_FOR_DOMAIN ExpandAuthDataForDomain;
36311fe17c3SAndreas Maier     PLSA_ALLOCATE_PRIVATE_HEAP AllocatePrivateHeap;
36411fe17c3SAndreas Maier     PLSA_FREE_PRIVATE_HEAP FreePrivateHeap;
365c2c66affSColin Finck } LSA_SECPKG_FUNCTION_TABLE,
366c2c66affSColin Finck  *PLSA_SECPKG_FUNCTION_TABLE;
367c2c66affSColin Finck 
368c2c66affSColin Finck /* LSA-mode functions implemented by SSP/AP obtainable by a dispatch table */
369c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_AP_INITIALIZE_PACKAGE)(ULONG, PLSA_DISPATCH_TABLE,
370c2c66affSColin Finck  PLSA_STRING, PLSA_STRING, PLSA_STRING *);
371c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_AP_LOGON_USER)(LPWSTR, LPWSTR, LPWSTR, LPWSTR,
372c2c66affSColin Finck  DWORD, DWORD, PHANDLE);
37311fe17c3SAndreas Maier typedef NTSTATUS (NTAPI *PLSA_AP_CALL_PACKAGE)(PLSA_CLIENT_REQUEST, PVOID, PVOID, ULONG,
374c2c66affSColin Finck  PVOID *, PULONG, PNTSTATUS);
375c2c66affSColin Finck typedef VOID (NTAPI *PLSA_AP_LOGON_TERMINATED)(PLUID);
376c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_AP_CALL_PACKAGE_UNTRUSTED)(PLSA_CLIENT_REQUEST,
377c2c66affSColin Finck  PVOID, PVOID, ULONG, PVOID *, PULONG, PNTSTATUS);
378*ae0bc81aSAndreas Maier typedef NTSTATUS (NTAPI *PLSA_AP_CALL_PACKAGE_PASSTHROUGH)(PLSA_CLIENT_REQUEST,
379c2c66affSColin Finck  PVOID, PVOID, ULONG, PVOID *, PULONG, PNTSTATUS);
380c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_AP_LOGON_USER_EX)(PLSA_CLIENT_REQUEST,
381c2c66affSColin Finck  SECURITY_LOGON_TYPE, PVOID, PVOID, ULONG, PVOID *, PULONG, PLUID, PNTSTATUS,
382c2c66affSColin Finck  PLSA_TOKEN_INFORMATION_TYPE, PVOID *, PUNICODE_STRING *, PUNICODE_STRING *,
383c2c66affSColin Finck  PUNICODE_STRING *);
384c2c66affSColin Finck typedef NTSTATUS (NTAPI *PLSA_AP_LOGON_USER_EX2)(PLSA_CLIENT_REQUEST,
385c2c66affSColin Finck  SECURITY_LOGON_TYPE, PVOID, PVOID, ULONG, PVOID *, PULONG, PLUID, PNTSTATUS,
386c2c66affSColin Finck  PLSA_TOKEN_INFORMATION_TYPE, PVOID *, PUNICODE_STRING *, PUNICODE_STRING *,
387c2c66affSColin Finck  PUNICODE_STRING *, PSECPKG_PRIMARY_CRED, PSECPKG_SUPPLEMENTAL_CRED_ARRAY *);
38811fe17c3SAndreas Maier typedef NTSTATUS (NTAPI SpInitializeFn)(ULONG_PTR, PSECPKG_PARAMETERS,
389c2c66affSColin Finck  PLSA_SECPKG_FUNCTION_TABLE);
390c2c66affSColin Finck typedef NTSTATUS (NTAPI SpShutDownFn)(void);
391c2c66affSColin Finck typedef NTSTATUS (NTAPI SpGetInfoFn)(PSecPkgInfoW);
392c2c66affSColin Finck typedef NTSTATUS (NTAPI SpAcceptCredentialsFn)(SECURITY_LOGON_TYPE,
393c2c66affSColin Finck  PUNICODE_STRING, PSECPKG_PRIMARY_CRED, PSECPKG_SUPPLEMENTAL_CRED);
394c2c66affSColin Finck typedef NTSTATUS (NTAPI SpAcquireCredentialsHandleFn)(PUNICODE_STRING, ULONG,
395c2c66affSColin Finck  PLUID, PVOID, PVOID, PVOID, PLSA_SEC_HANDLE, PTimeStamp);
396c2c66affSColin Finck typedef NTSTATUS (NTAPI SpQueryCredentialsAttributesFn)(LSA_SEC_HANDLE, ULONG,
397c2c66affSColin Finck  PVOID);
398c2c66affSColin Finck typedef NTSTATUS (NTAPI SpFreeCredentialsHandleFn)(LSA_SEC_HANDLE);
399c2c66affSColin Finck typedef NTSTATUS (NTAPI SpSaveCredentialsFn)(LSA_SEC_HANDLE, PSecBuffer);
400c2c66affSColin Finck typedef NTSTATUS (NTAPI SpGetCredentialsFn)(LSA_SEC_HANDLE, PSecBuffer);
401c2c66affSColin Finck typedef NTSTATUS (NTAPI SpDeleteCredentialsFn)(LSA_SEC_HANDLE, PSecBuffer);
402c2c66affSColin Finck typedef NTSTATUS (NTAPI SpInitLsaModeContextFn)(LSA_SEC_HANDLE, LSA_SEC_HANDLE,
403c2c66affSColin Finck  PUNICODE_STRING, ULONG, ULONG, PSecBufferDesc, PLSA_SEC_HANDLE, PSecBufferDesc,
404c2c66affSColin Finck  PULONG, PTimeStamp, PBOOLEAN, PSecBuffer);
405c2c66affSColin Finck typedef NTSTATUS (NTAPI SpAcceptLsaModeContextFn)(LSA_SEC_HANDLE,
406c2c66affSColin Finck  LSA_SEC_HANDLE, PSecBufferDesc, ULONG, ULONG, PLSA_SEC_HANDLE, PSecBufferDesc,
407c2c66affSColin Finck  PULONG, PTimeStamp, PBOOLEAN, PSecBuffer);
408c2c66affSColin Finck typedef NTSTATUS (NTAPI SpDeleteContextFn)(LSA_SEC_HANDLE);
409c2c66affSColin Finck typedef NTSTATUS (NTAPI SpApplyControlTokenFn)(LSA_SEC_HANDLE, PSecBufferDesc);
410c2c66affSColin Finck typedef NTSTATUS (NTAPI SpGetUserInfoFn)(PLUID, ULONG, PSecurityUserData *);
411c2c66affSColin Finck typedef NTSTATUS (NTAPI SpGetExtendedInformationFn)(
412c2c66affSColin Finck  SECPKG_EXTENDED_INFORMATION_CLASS, PSECPKG_EXTENDED_INFORMATION *);
413c2c66affSColin Finck typedef NTSTATUS (NTAPI SpQueryContextAttributesFn)(LSA_SEC_HANDLE, ULONG,
414c2c66affSColin Finck  PVOID);
415c2c66affSColin Finck typedef NTSTATUS (NTAPI SpAddCredentialsFn)(LSA_SEC_HANDLE, PUNICODE_STRING,
416c2c66affSColin Finck  PUNICODE_STRING, ULONG, PVOID, PVOID, PVOID, PTimeStamp);
417c2c66affSColin Finck typedef NTSTATUS (NTAPI SpSetExtendedInformationFn)(
418c2c66affSColin Finck  SECPKG_EXTENDED_INFORMATION_CLASS, PSECPKG_EXTENDED_INFORMATION);
419c2c66affSColin Finck typedef NTSTATUS (NTAPI SpSetContextAttributesFn)(LSA_SEC_HANDLE, ULONG, PVOID,
420c2c66affSColin Finck  ULONG);
421c2c66affSColin Finck typedef NTSTATUS (NTAPI SpSetCredentialsAttributesFn)(LSA_SEC_HANDLE, ULONG,
422c2c66affSColin Finck  PVOID, ULONG);
423c2c66affSColin Finck typedef NTSTATUS (NTAPI SpChangeAccountPasswordFn)(PUNICODE_STRING,
424c2c66affSColin Finck  PUNICODE_STRING, PUNICODE_STRING, PUNICODE_STRING, BOOLEAN, PSecBufferDesc);
425c2c66affSColin Finck typedef NTSTATUS (NTAPI SpQueryMetaDataFn)(LSA_SEC_HANDLE, PUNICODE_STRING,
426c2c66affSColin Finck  ULONG, PULONG, PUCHAR *, PLSA_SEC_HANDLE);
427c2c66affSColin Finck typedef NTSTATUS (NTAPI SpExchangeMetaDataFn)(LSA_SEC_HANDLE, PUNICODE_STRING,
428c2c66affSColin Finck  ULONG, ULONG, PUCHAR, PLSA_SEC_HANDLE);
429c2c66affSColin Finck typedef NTSTATUS (NTAPI SpGetCredUIContextFn)(LSA_SEC_HANDLE, GUID *, PULONG,
430c2c66affSColin Finck  PUCHAR *);
431c2c66affSColin Finck typedef NTSTATUS (NTAPI SpUpdateCredentialsFn)(LSA_SEC_HANDLE, GUID *, ULONG,
432c2c66affSColin Finck  PUCHAR);
433c2c66affSColin Finck typedef NTSTATUS (NTAPI SpValidateTargetInfoFn)(PLSA_CLIENT_REQUEST, PVOID,
434c2c66affSColin Finck  PVOID, ULONG, PSECPKG_TARGETINFO);
435c2c66affSColin Finck typedef NTSTATUS (NTAPI LSA_AP_POST_LOGON_USER)(PSECPKG_POST_LOGON_USER_INFO);
436c2c66affSColin Finck 
437c2c66affSColin Finck /* User-mode functions implemented by SSP/AP obtainable by a dispatch table */
438c2c66affSColin Finck typedef NTSTATUS (NTAPI SpInstanceInitFn)(ULONG, PSECPKG_DLL_FUNCTIONS,
439c2c66affSColin Finck  PVOID *);
440c2c66affSColin Finck typedef NTSTATUS (NTAPI SpInitUserModeContextFn)(LSA_SEC_HANDLE, PSecBuffer);
441c2c66affSColin Finck typedef NTSTATUS (NTAPI SpMakeSignatureFn)(LSA_SEC_HANDLE, ULONG,
442c2c66affSColin Finck  PSecBufferDesc, ULONG);
443c2c66affSColin Finck typedef NTSTATUS (NTAPI SpVerifySignatureFn)(LSA_SEC_HANDLE, PSecBufferDesc,
444c2c66affSColin Finck  ULONG, PULONG);
445c2c66affSColin Finck typedef NTSTATUS (NTAPI SpSealMessageFn)(LSA_SEC_HANDLE, ULONG, PSecBufferDesc,
446c2c66affSColin Finck  ULONG);
447c2c66affSColin Finck typedef NTSTATUS (NTAPI SpUnsealMessageFn)(LSA_SEC_HANDLE, PSecBufferDesc,
448c2c66affSColin Finck  ULONG, PULONG);
449c2c66affSColin Finck typedef NTSTATUS (NTAPI SpGetContextTokenFn)(LSA_SEC_HANDLE, PHANDLE);
450c2c66affSColin Finck typedef NTSTATUS (NTAPI SpCompleteAuthTokenFn)(LSA_SEC_HANDLE, PSecBufferDesc);
451c2c66affSColin Finck typedef NTSTATUS (NTAPI SpFormatCredentialsFn)(PSecBuffer, PSecBuffer);
452c2c66affSColin Finck typedef NTSTATUS (NTAPI SpMarshallSupplementalCredsFn)(ULONG, PUCHAR, PULONG,
453c2c66affSColin Finck  PVOID *);
454c2c66affSColin Finck typedef NTSTATUS (NTAPI SpExportSecurityContextFn)(LSA_SEC_HANDLE, ULONG,
455c2c66affSColin Finck  PSecBuffer, PHANDLE);
456c2c66affSColin Finck typedef NTSTATUS (NTAPI SpImportSecurityContextFn)(PSecBuffer, HANDLE,
457c2c66affSColin Finck  PLSA_SEC_HANDLE);
458c2c66affSColin Finck 
459c2c66affSColin Finck #ifdef WINE_NO_UNICODE_MACROS
460c2c66affSColin Finck #undef SetContextAttributes
461c2c66affSColin Finck #endif
462c2c66affSColin Finck 
463c2c66affSColin Finck /* dispatch tables of LSA-mode functions implemented by SSP/AP */
4643cdb717aSHermès Bélusca-Maïto typedef struct _SECPKG_FUNCTION_TABLE {
465c2c66affSColin Finck     PLSA_AP_INITIALIZE_PACKAGE InitializePackage;
466c2c66affSColin Finck     PLSA_AP_LOGON_USER LsaLogonUser;
467c2c66affSColin Finck     PLSA_AP_CALL_PACKAGE CallPackage;
468c2c66affSColin Finck     PLSA_AP_LOGON_TERMINATED LogonTerminated;
469c2c66affSColin Finck     PLSA_AP_CALL_PACKAGE_UNTRUSTED CallPackageUntrusted;
470c2c66affSColin Finck     PLSA_AP_CALL_PACKAGE_PASSTHROUGH CallPackagePassthrough;
471c2c66affSColin Finck     PLSA_AP_LOGON_USER_EX LogonUserEx;
472c2c66affSColin Finck     PLSA_AP_LOGON_USER_EX2 LogonUserEx2;
473c2c66affSColin Finck     SpInitializeFn *Initialize;
474c2c66affSColin Finck     SpShutDownFn *Shutdown;
475c2c66affSColin Finck     SpGetInfoFn *GetInfo;
476c2c66affSColin Finck     SpAcceptCredentialsFn *AcceptCredentials;
477c2c66affSColin Finck     SpAcquireCredentialsHandleFn *SpAcquireCredentialsHandle;
478c2c66affSColin Finck     SpQueryCredentialsAttributesFn *SpQueryCredentialsAttributes;
479c2c66affSColin Finck     SpFreeCredentialsHandleFn *FreeCredentialsHandle;
480c2c66affSColin Finck     SpSaveCredentialsFn *SaveCredentials;
481c2c66affSColin Finck     SpGetCredentialsFn *GetCredentials;
482c2c66affSColin Finck     SpDeleteCredentialsFn *DeleteCredentials;
483c2c66affSColin Finck     SpInitLsaModeContextFn *InitLsaModeContext;
484c2c66affSColin Finck     SpAcceptLsaModeContextFn *AcceptLsaModeContext;
485c2c66affSColin Finck     SpDeleteContextFn *DeleteContext;
486c2c66affSColin Finck     SpApplyControlTokenFn *ApplyControlToken;
487c2c66affSColin Finck     SpGetUserInfoFn *GetUserInfo;
488c2c66affSColin Finck     SpGetExtendedInformationFn *GetExtendedInformation;
489c2c66affSColin Finck     SpQueryContextAttributesFn *SpQueryContextAttributes;
490c2c66affSColin Finck     SpAddCredentialsFn *SpAddCredentials;
491c2c66affSColin Finck     SpSetExtendedInformationFn *SetExtendedInformation;
492c2c66affSColin Finck     /* Packages with version SECPKG_INTERFACE_VERSION end here */
493c2c66affSColin Finck     SpSetContextAttributesFn *SetContextAttributes;
494c2c66affSColin Finck     /* Packages with version SECPKG_INTERFACE_VERSION_2 end here */
495c2c66affSColin Finck     SpSetCredentialsAttributesFn *SetCredentialsAttributes;
496c2c66affSColin Finck     /* Packages with version SECPKG_INTERFACE_VERSION_3 end here */
497c2c66affSColin Finck     SpChangeAccountPasswordFn *ChangeAccountPassword;
498c2c66affSColin Finck     /* Packages with version SECPKG_INTERFACE_VERSION_4 end here */
499c2c66affSColin Finck     SpQueryMetaDataFn *QueryMetaData;
500c2c66affSColin Finck     SpExchangeMetaDataFn *ExchangeMetaData;
501c2c66affSColin Finck     SpGetCredUIContextFn *GetCredUIContext;
502c2c66affSColin Finck     SpUpdateCredentialsFn *UpdateCredentials;
503c2c66affSColin Finck     /* Packages with version SECPKG_INTERFACE_VERSION_5 end here */
504c2c66affSColin Finck     SpValidateTargetInfoFn *ValidateTargetInfo;
505c2c66affSColin Finck     /* Packages with version SECPKG_INTERFACE_VERSION_6 end here */
506c2c66affSColin Finck     LSA_AP_POST_LOGON_USER* PostLogonUser;
507c2c66affSColin Finck     /* Packages with version SECPKG_INTERFACE_VERSION_7 end here */
508c2c66affSColin Finck } SECPKG_FUNCTION_TABLE,
509c2c66affSColin Finck  *PSECPKG_FUNCTION_TABLE;
510c2c66affSColin Finck 
511c2c66affSColin Finck /* dispatch tables of user-mode functions implemented by SSP/AP */
5123cdb717aSHermès Bélusca-Maïto typedef struct _SECPKG_USER_FUNCTION_TABLE {
513c2c66affSColin Finck     SpInstanceInitFn *InstanceInit;
514c2c66affSColin Finck     SpInitUserModeContextFn *InitUserModeContext;
515c2c66affSColin Finck     SpMakeSignatureFn *MakeSignature;
516c2c66affSColin Finck     SpVerifySignatureFn *VerifySignature;
517c2c66affSColin Finck     SpSealMessageFn *SealMessage;
518c2c66affSColin Finck     SpUnsealMessageFn *UnsealMessage;
519c2c66affSColin Finck     SpGetContextTokenFn *GetContextToken;
520c2c66affSColin Finck     SpQueryContextAttributesFn *SpQueryContextAttributes;
521c2c66affSColin Finck     SpCompleteAuthTokenFn *CompleteAuthToken;
522c2c66affSColin Finck     SpDeleteContextFn *DeleteUserModeContext;
523c2c66affSColin Finck     SpFormatCredentialsFn *FormatCredentials;
524c2c66affSColin Finck     SpMarshallSupplementalCredsFn *MarshallSupplementalCreds;
525c2c66affSColin Finck     SpExportSecurityContextFn *ExportContext;
526c2c66affSColin Finck     SpImportSecurityContextFn *ImportContext;
527c2c66affSColin Finck } SECPKG_USER_FUNCTION_TABLE,
528c2c66affSColin Finck  *PSECPKG_USER_FUNCTION_TABLE;
529c2c66affSColin Finck 
530c2c66affSColin Finck /* LSA-mode entry point to SSP/APs */
531c2c66affSColin Finck typedef NTSTATUS (NTAPI *SpLsaModeInitializeFn)(ULONG, PULONG,
532c2c66affSColin Finck  PSECPKG_FUNCTION_TABLE *, PULONG);
533c2c66affSColin Finck 
534c2c66affSColin Finck /* User-mode entry point to SSP/APs */
535c2c66affSColin Finck typedef NTSTATUS (WINAPI *SpUserModeInitializeFn)(ULONG, PULONG,
536c2c66affSColin Finck  PSECPKG_USER_FUNCTION_TABLE *, PULONG);
537c2c66affSColin Finck 
538c2c66affSColin Finck #ifdef __cplusplus
539c2c66affSColin Finck }
540c2c66affSColin Finck #endif
541c2c66affSColin Finck #endif /* _NTSECPKG_H */
542