ReactOS 0.4.16-dev-197-g92996da
global.c
Go to the documentation of this file.
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"
13
14/* globals */
16
18
20/* msv1_0 (XP, win2k) returns NULL for
21 * InitializePackage, LsaLogonUser,LsaLogonUserEx,
22 * SpQueryContextAttributes and SpAddCredentials */
24{
25 {
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
58{
59 {
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};
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define NULL
Definition: types.h:112
NTSTATUS NTAPI LsaSpSaveCredentials(_In_ LSA_SEC_HANDLE CredentialHandle, _In_ PSecBuffer Credentials)
Definition: lsa.c:90
NTSTATUS NTAPI LsaSpInitLsaModeContext(_In_ LSA_SEC_HANDLE CredentialHandle, _In_ LSA_SEC_HANDLE ContextHandle, _In_ PUNICODE_STRING TargetName, _In_ ULONG ContextRequirements, _In_ ULONG TargetDataRep, _In_ PSecBufferDesc InputBuffers, _Out_ PLSA_SEC_HANDLE NewContextHandle, _Inout_ PSecBufferDesc OutputBuffers, _Out_ PULONG ContextAttributes, _Out_ PTimeStamp ExpirationTime, _Out_ PBOOLEAN MappedContext, _Out_ PSecBuffer ContextData)
Definition: lsa.c:129
NTSTATUS NTAPI LsaSpGetExtendedInformation(_In_ SECPKG_EXTENDED_INFORMATION_CLASS Class, _Out_ PSECPKG_EXTENDED_INFORMATION *ppInfo)
Definition: lsa.c:207
NTSTATUS NTAPI LsaSpAcceptLsaModeContext(_In_ LSA_SEC_HANDLE CredentialHandle, _In_ LSA_SEC_HANDLE ContextHandle, _In_ PSecBufferDesc InputBuffer, _In_ ULONG ContextRequirements, _In_ ULONG TargetDataRep, _Out_ PLSA_SEC_HANDLE NewContextHandle, _Inout_ PSecBufferDesc OutputBuffer, _Out_ PULONG ContextAttributes, _Out_ PTimeStamp ExpirationTime, _Out_ PBOOLEAN MappedContext, _Out_ PSecBuffer ContextData)
Definition: lsa.c:154
NTSTATUS NTAPI LsaSpDeleteCredentials(_In_ LSA_SEC_HANDLE CredentialHandle, _In_ PSecBuffer Key)
Definition: lsa.c:110
NTSTATUS NTAPI LsaSpSetExtendedInformation(_In_ SECPKG_EXTENDED_INFORMATION_CLASS Class, _In_ PSECPKG_EXTENDED_INFORMATION Info)
Definition: lsa.c:218
NTSTATUS NTAPI LsaSpGetInfoW(_Out_ PSecPkgInfoW PackageInfo)
Definition: lsa.c:120
NTSTATUS NTAPI LsaSpAcquireCredentialsHandle(_In_ PUNICODE_STRING PrincipalName, _In_ ULONG CredentialUseFlags, _In_ PLUID LogonId, _In_ PVOID AuthorizationData, _In_ PVOID GetKeyFunciton, _In_ PVOID GetKeyArgument, _Out_ PLSA_SEC_HANDLE CredentialHandle, _Out_ PTimeStamp ExpirationTime)
Definition: lsa.c:50
NTSTATUS NTAPI SpAcceptCredentials(_In_ SECURITY_LOGON_TYPE LogonType, _In_ PUNICODE_STRING AccountName, _In_ PSECPKG_PRIMARY_CRED PrimaryCredentials, _In_ PSECPKG_SUPPLEMENTAL_CRED SupplementalCredentials)
Definition: lsa.c:37
NTSTATUS NTAPI LsaSpQueryCredentialsAttributes(_In_ LSA_SEC_HANDLE CredentialHandle, _In_ ULONG CredentialAttribute, _Inout_ PVOID Buffer)
Definition: lsa.c:69
NTSTATUS NTAPI LsaSpGetCredentials(_In_ LSA_SEC_HANDLE CredentialHandle, _Inout_ PSecBuffer Credentials)
Definition: lsa.c:100
NTSTATUS NTAPI LsaSpApplyControlToken(_In_ LSA_SEC_HANDLE ContextHandle, _In_ PSecBufferDesc ControlToken)
Definition: lsa.c:186
NTSTATUS NTAPI LsaSpFreeCredentialsHandle(_In_ LSA_SEC_HANDLE CredentialHandle)
Definition: lsa.c:81
NTSTATUS NTAPI LsaSpGetUserInfo(_In_ PLUID LogonId, _In_ ULONG Flags, _Out_ PSecurityUserData *UserData)
Definition: lsa.c:196
NTSTATUS NTAPI SpInitialize(_In_ ULONG_PTR PackageId, _In_ PSECPKG_PARAMETERS Parameters, _In_ PLSA_SECPKG_FUNCTION_TABLE FunctionTable)
Definition: lsa.c:16
NTSTATUS NTAPI LsaSpShutDown(VOID)
Definition: lsa.c:28
NTSTATUS NTAPI LsaSpDeleteContext(_In_ LSA_SEC_HANDLE ContextHandle)
Definition: lsa.c:177
NTSTATUS NTAPI UsrSpDeleteUserModeContext(_In_ LSA_SEC_HANDLE ContextHandle)
Definition: user.c:117
NTSTATUS NTAPI SpInstanceInit(_In_ ULONG Version, _In_ PSECPKG_DLL_FUNCTIONS FunctionTable, _Inout_ PVOID *UserFunctions)
Definition: user.c:15
NTSTATUS NTAPI UsrSpGetContextToken(_In_ LSA_SEC_HANDLE ContextHandle, _Inout_ PHANDLE ImpersonationToken)
Definition: user.c:83
NTSTATUS NTAPI UsrSpCompleteAuthToken(_In_ LSA_SEC_HANDLE ContextHandle, _In_ PSecBufferDesc InputBuffer)
Definition: user.c:106
NTSTATUS NTAPI UsrSpFormatCredentials(_In_ PSecBuffer Credentials, _Inout_ PSecBuffer FormattedCredentials)
Definition: user.c:127
NTSTATUS NTAPI UsrSpVerifySignature(_In_ LSA_SEC_HANDLE phContext, _In_ PSecBufferDesc pMessage, _In_ ULONG MessageSeqNo, _In_ PULONG pfQOP)
Definition: user.c:41
NTSTATUS NTAPI UsrSpQueryContextAttributes(_In_ LSA_SEC_HANDLE ContextHandle, _In_ ULONG ContextAttribute, _Inout_ PVOID Buffer)
Definition: user.c:94
NTSTATUS NTAPI UsrSpMakeSignature(_In_ LSA_SEC_HANDLE ContextHandle, _In_ ULONG QualityOfProtection, _Inout_ PSecBufferDesc MessageBuffers, _In_ ULONG MessageSequenceNumber)
Definition: user.c:27
NTSTATUS NTAPI UsrSpImportSecurityContext(_In_ PSecBuffer pPackedContext, _In_ HANDLE Token, _Inout_ PLSA_SEC_HANDLE phContext)
Definition: user.c:167
NTSTATUS NTAPI UsrSpUnsealMessage(_In_ LSA_SEC_HANDLE ContextHandle, _Inout_ PSecBufferDesc MessageBuffers, _In_ ULONG MessageSequenceNumber, _In_ PULONG QualityOfProtection)
Definition: user.c:69
NTSTATUS NTAPI UsrSpMarshallSupplementalCreds(_In_ ULONG CredentialSize, _In_ PUCHAR Credentials, _Inout_ PULONG MarshalledCredSize, _Inout_ PVOID *MarshalledCreds)
Definition: user.c:139
NTSTATUS NTAPI UsrSpSealMessage(_In_ LSA_SEC_HANDLE ContextHandle, _In_ ULONG QualityOfProtection, _Inout_ PSecBufferDesc MessageBuffers, _In_ ULONG MessageSequenceNumber)
Definition: user.c:55
NTSTATUS NTAPI UsrSpExportSecurityContext(_In_ LSA_SEC_HANDLE phContext, _In_ ULONG fFlags, _Inout_ PSecBuffer pPackedContext, _Inout_ PHANDLE pToken)
Definition: user.c:153
enum _NTLM_MODE NTLM_MODE
@ NtlmUnknownMode
Definition: global.h:24
SECPKG_USER_FUNCTION_TABLE NtlmUsrFn[1]
Definition: global.c:57
NTLM_MODE NtlmMode
Definition: global.c:15
PLSA_SECPKG_FUNCTION_TABLE LsaFunctions
Definition: global.c:19
SECPKG_FUNCTION_TABLE NtlmLsaFn[1]
Definition: global.c:23
LSA_DISPATCH_TABLE DispatchTable
Definition: global.c:17
PSECPKG_DLL_FUNCTIONS UsrFunctions
Definition: global.c:56
NTSTATUS NTAPI LsaApLogonUserEx2(IN PLSA_CLIENT_REQUEST ClientRequest, IN SECURITY_LOGON_TYPE LogonType, IN PVOID ProtocolSubmitBuffer, IN PVOID ClientBufferBase, IN ULONG SubmitBufferSize, OUT PVOID *ProfileBuffer, OUT PULONG ProfileBufferSize, OUT PLUID LogonId, OUT PNTSTATUS SubStatus, OUT PLSA_TOKEN_INFORMATION_TYPE TokenInformationType, OUT PVOID *TokenInformation, OUT PUNICODE_STRING *AccountName, OUT PUNICODE_STRING *AuthenticatingAuthority, OUT PUNICODE_STRING *MachineName, OUT PSECPKG_PRIMARY_CRED PrimaryCredentials, OUT PSECPKG_SUPPLEMENTAL_CRED_ARRAY *SupplementalCredentials)
Definition: msv1_0.c:1253
NTSTATUS NTAPI LsaApCallPackagePassthrough(IN PLSA_CLIENT_REQUEST ClientRequest, IN PVOID ProtocolSubmitBuffer, IN PVOID ClientBufferBase, IN ULONG SubmitBufferLength, OUT PVOID *ProtocolReturnBuffer, OUT PULONG ReturnBufferLength, OUT PNTSTATUS ProtocolStatus)
Definition: msv1_0.c:1033
NTSTATUS NTAPI LsaApCallPackage(IN PLSA_CLIENT_REQUEST ClientRequest, IN PVOID ProtocolSubmitBuffer, IN PVOID ClientBufferBase, IN ULONG SubmitBufferLength, OUT PVOID *ProtocolReturnBuffer, OUT PULONG ReturnBufferLength, OUT PNTSTATUS ProtocolStatus)
Definition: msv1_0.c:958
NTSTATUS NTAPI LsaApCallPackageUntrusted(IN PLSA_CLIENT_REQUEST ClientRequest, IN PVOID ProtocolSubmitBuffer, IN PVOID ClientBufferBase, IN ULONG SubmitBufferLength, OUT PVOID *ProtocolReturnBuffer, OUT PULONG ReturnBufferLength, OUT PNTSTATUS ProtocolStatus)
Definition: msv1_0.c:1051
VOID NTAPI LsaApLogonTerminated(IN PLUID LogonId)
Definition: msv1_0.c:1152
PLSA_AP_INITIALIZE_PACKAGE InitializePackage
Definition: ntsecpkg.h:465
SpInstanceInitFn * InstanceInit
Definition: ntsecpkg.h:513
NTSTATUS NTAPI UsrSpInitUserModeContext(_In_ LSA_SEC_HANDLE ContextHandle, _In_ PSecBuffer PackedContext)
Definition: usercontext.c:15