xref: /reactos/dll/win32/msv1_0/ntlm/global.c (revision 1734f297)
1 /*
2  * PROJECT:     Authentication Package DLL
3  * LICENSE:     GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4  * PURPOSE:     NTLM globals definitions (header)
5  * COPYRIGHT:   Copyright 2011 Samuel Serapión
6  *              Copyright 2020 Andreas Maier <staubim@quantentunnel.de>
7  */
8 
9 #include "../precomp.h"
10 
11 #include "wine/debug.h"
12 WINE_DEFAULT_DEBUG_CHANNEL(ntlm);
13 
14 /* globals */
15 NTLM_MODE NtlmMode = NtlmUnknownMode;
16 
17 LSA_DISPATCH_TABLE DispatchTable;
18 
19 PLSA_SECPKG_FUNCTION_TABLE LsaFunctions = NULL;
20 /* msv1_0 (XP, win2k) returns NULL for
21  * InitializePackage, LsaLogonUser,LsaLogonUserEx,
22  * SpQueryContextAttributes and SpAddCredentials */
23 SECPKG_FUNCTION_TABLE NtlmLsaFn[1] =
24 {
25     {
26         .InitializePackage = NULL,
27         .LsaLogonUser = NULL,
28         .CallPackage = LsaApCallPackage,
29         .LogonTerminated = LsaApLogonTerminated,
30         .CallPackageUntrusted = LsaApCallPackageUntrusted,
31         .CallPackagePassthrough = LsaApCallPackagePassthrough,
32         .LogonUserEx = NULL,
33         .LogonUserEx2 = LsaApLogonUserEx2,
34         .Initialize = SpInitialize,
35         .Shutdown = LsaSpShutDown,
36         .GetInfo = LsaSpGetInfoW,
37         .AcceptCredentials = SpAcceptCredentials,
38         .SpAcquireCredentialsHandle = LsaSpAcquireCredentialsHandle,
39         .SpQueryCredentialsAttributes = LsaSpQueryCredentialsAttributes,
40         .FreeCredentialsHandle = LsaSpFreeCredentialsHandle,
41         .SaveCredentials = LsaSpSaveCredentials,
42         .GetCredentials = LsaSpGetCredentials,
43         .DeleteCredentials = LsaSpDeleteCredentials,
44         .InitLsaModeContext = LsaSpInitLsaModeContext,
45         .AcceptLsaModeContext = LsaSpAcceptLsaModeContext,
46         .DeleteContext = LsaSpDeleteContext,
47         .ApplyControlToken = LsaSpApplyControlToken,
48         .GetUserInfo = LsaSpGetUserInfo,
49         .GetExtendedInformation = LsaSpGetExtendedInformation,
50         .SpQueryContextAttributes = NULL,
51         .SpAddCredentials = NULL,
52         .SetExtendedInformation = LsaSpSetExtendedInformation
53     }
54 };
55 
56 PSECPKG_DLL_FUNCTIONS UsrFunctions = NULL;
57 SECPKG_USER_FUNCTION_TABLE NtlmUsrFn[1] =
58 {
59     {
60         .InstanceInit = SpInstanceInit,
61         .InitUserModeContext = UsrSpInitUserModeContext,
62         .MakeSignature = UsrSpMakeSignature,
63         .VerifySignature = UsrSpVerifySignature,
64         .SealMessage = UsrSpSealMessage,
65         .UnsealMessage = UsrSpUnsealMessage,
66         .GetContextToken = UsrSpGetContextToken,
67         .SpQueryContextAttributes = UsrSpQueryContextAttributes,
68         .CompleteAuthToken = UsrSpCompleteAuthToken,
69         .DeleteUserModeContext = UsrSpDeleteUserModeContext,
70         .FormatCredentials = UsrSpFormatCredentials,
71         .MarshallSupplementalCreds = UsrSpMarshallSupplementalCreds,
72         .ExportContext = UsrSpExportSecurityContext,
73         .ImportContext = UsrSpImportSecurityContext
74     }
75 };
76