ReactOS 0.4.15-dev-7953-g1f49173
lsa.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 functions returned from SpLsaModeInitialize (PSECPKG_FUNCTION_TABLE)
5 * COPYRIGHT: Copyright 2019-2020 Andreas Maier <staubim@quantentunnel.de>
6 */
7
8#include "precomp.h"
9
10#include "wine/debug.h"
12
13
20{
21 TRACE("LsaSpInitialize (0x%p, 0x%p, 0x%p)\n",
24}
25
29{
30 TRACE("LsaSpShutDown\n");
32}
33
34/* MS doc says name must be SpAcceptCredentials! */
39 _In_ PUNICODE_STRING AccountName,
40 _In_ PSECPKG_PRIMARY_CRED PrimaryCredentials,
41 _In_ PSECPKG_SUPPLEMENTAL_CRED SupplementalCredentials)
42{
43 TRACE("LsaSpAcceptCredentials(%li %wZ 0x%p 0x%p)\n",
44 LogonType, AccountName, PrimaryCredentials, SupplementalCredentials);
46}
47
51 _In_ PUNICODE_STRING PrincipalName,
52 _In_ ULONG CredentialUseFlags,
54 _In_ PVOID AuthorizationData,
55 _In_ PVOID GetKeyFunciton,
56 _In_ PVOID GetKeyArgument,
57 _Out_ PLSA_SEC_HANDLE CredentialHandle,
58 _Out_ PTimeStamp ExpirationTime)
59{
60 TRACE("LsaSpAcquireCredentialsHandle(%wZ 0x%lx 0x%p 0x%p 0x%p 0x%p 0x%p 0x%p)\n",
61 PrincipalName, CredentialUseFlags, LogonId,
62 AuthorizationData, GetKeyFunciton, GetKeyArgument,
63 CredentialHandle, ExpirationTime);
65}
66
70 _In_ LSA_SEC_HANDLE CredentialHandle,
71 _In_ ULONG CredentialAttribute,
73{
74 TRACE("LsaSpQueryCredentialsAttributes(0x%p 0x%lx 0x%p)\n",
75 CredentialHandle, CredentialAttribute, Buffer);
77}
78
82 _In_ LSA_SEC_HANDLE CredentialHandle)
83{
84 TRACE("LsaSpFreeCredentialsHandle(0x%p)\n", CredentialHandle);
86}
87
91 _In_ LSA_SEC_HANDLE CredentialHandle,
92 _In_ PSecBuffer Credentials)
93{
94 TRACE("LsaSpSaveCredentials(0x%p 0x%p)\n", CredentialHandle, Credentials);
96}
97
101 _In_ LSA_SEC_HANDLE CredentialHandle,
102 _Inout_ PSecBuffer Credentials)
103{
104 TRACE("LsaSpGetCredentials(0x%p 0x%p)\n", CredentialHandle, Credentials);
106}
107
109NTAPI
111 _In_ LSA_SEC_HANDLE CredentialHandle,
113{
114 TRACE("LsaSpDeleteCredentials(0x%p 0x%p)\n", CredentialHandle, Key);
116}
117
119NTAPI
121 _Out_ PSecPkgInfoW PackageInfo)
122{
123 TRACE("LsaGetInfo(0x%p)\n", PackageInfo);
125}
126
128NTAPI
130 _In_ LSA_SEC_HANDLE CredentialHandle,
131 _In_ LSA_SEC_HANDLE ContextHandle,
133 _In_ ULONG ContextRequirements,
134 _In_ ULONG TargetDataRep,
135 _In_ PSecBufferDesc InputBuffers,
136 _Out_ PLSA_SEC_HANDLE NewContextHandle,
137 _Inout_ PSecBufferDesc OutputBuffers,
138 _Out_ PULONG ContextAttributes,
139 _Out_ PTimeStamp ExpirationTime,
140 _Out_ PBOOLEAN MappedContext,
141 _Out_ PSecBuffer ContextData)
142{
143 TRACE("LsaSpInitLsaModeContext(0x%p 0x%p %wZ 0x%lx %i 0x%p 0x%p 0x%p "
144 "0x%p 0x%p 0x%p 0x%p 0x%p 0x%p 0x%p 0x%p)\n",
145 CredentialHandle, ContextHandle, TargetName,
146 ContextRequirements, TargetDataRep, InputBuffers,
147 NewContextHandle, OutputBuffers, ContextAttributes,
148 ExpirationTime, MappedContext, ContextData);
150}
151
153NTAPI
155 _In_ LSA_SEC_HANDLE CredentialHandle,
156 _In_ LSA_SEC_HANDLE ContextHandle,
158 _In_ ULONG ContextRequirements,
159 _In_ ULONG TargetDataRep,
160 _Out_ PLSA_SEC_HANDLE NewContextHandle,
162 _Out_ PULONG ContextAttributes,
163 _Out_ PTimeStamp ExpirationTime,
164 _Out_ PBOOLEAN MappedContext,
165 _Out_ PSecBuffer ContextData)
166{
167 TRACE("LsaSpAcceptLsaModeContext(0x%p 0x%p 0x%p %i %i 0x%p 0x%p 0x%p "
168 "0x%p 0x%p 0x%p)\n",
169 CredentialHandle, ContextHandle, InputBuffer, ContextRequirements,
170 TargetDataRep, NewContextHandle, OutputBuffer,
171 ContextAttributes, ExpirationTime, MappedContext, ContextData);
173}
174
176NTAPI
178 _In_ LSA_SEC_HANDLE ContextHandle)
179{
180 TRACE("LsaSpDeleteContext(0x%p)\n", ContextHandle);
182}
183
185NTAPI
187 _In_ LSA_SEC_HANDLE ContextHandle,
188 _In_ PSecBufferDesc ControlToken)
189{
190 TRACE("LsaSpApplyControlToken(0x%p 0x%p)\n", ContextHandle, ControlToken);
192}
193
195NTAPI
200{
201 TRACE("LsaSpGetUserInfo(0x%p 0x%lx 0x%p)\n", LogonId, Flags, UserData);
203}
204
206NTAPI
210{
211 TRACE("LsaSpGetExtendedInformation(0x%lx 0x%p)\n",
212 Class, ppInfo);
214}
215
217NTAPI
221{
222 TRACE("LsaSpSetExtendedInformation(0x%lx 0x%p)\n",
223 Class, Info);
225}
static ULONG PackageId
Definition: authpackage.c:163
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
LONG NTSTATUS
Definition: precomp.h:26
Definition: bufpool.h:45
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
#define _Inout_
Definition: ms_sal.h:378
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
_IRQL_requires_same_ _In_ PLSA_STRING _In_ SECURITY_LOGON_TYPE LogonType
_IRQL_requires_same_ _In_ PLSA_STRING _In_ SECURITY_LOGON_TYPE _In_ ULONG _In_ ULONG _In_opt_ PTOKEN_GROUPS _In_ PTOKEN_SOURCE _Out_ PVOID _Out_ PULONG _Inout_ PLUID LogonId
enum _SECURITY_LOGON_TYPE SECURITY_LOGON_TYPE
ULONG LSA_SEC_HANDLE
Definition: ntsecpkg.h:208
ULONG * PLSA_SEC_HANDLE
Definition: ntsecpkg.h:208
enum _SECPKG_EXTENDED_INFORMATION_CLASS SECPKG_EXTENDED_INFORMATION_CLASS
PVOID *typedef PSecBuffer
Definition: ntsecpkg.h:440
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:239
static PCWSTR TargetName
Definition: ping.c:67
#define TRACE(s)
Definition: solgame.cpp:4
uint32_t * PULONG
Definition: typedefs.h:59
unsigned char * PBOOLEAN
Definition: typedefs.h:53
#define NTAPI
Definition: typedefs.h:36
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:690
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
Definition: wdfio.h:869
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
Definition: wdfiotarget.h:863
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR InputBuffer
Definition: wdfiotarget.h:953
static WLX_DISPATCH_VERSION_1_4 FunctionTable
Definition: wlx.c:722
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170