ReactOS  0.4.15-dev-1177-g6cb3b62
lsa.c
Go to the documentation of this file.
1 /*
2  * PROJECT: Authentication Package DLL
3  * LICENSE: GPL - See COPYING in the top level directory
4  * FILE: dll/win32/msv1_0/lsa.c
5  * PURPOSE: NTLM-functions returned from SpLsaModeInitialize
6  (PSECPKG_FUNCTION_TABLE)
7  * COPYRIGHT: Copyright 2019-2020 Andreas Maier <staubim@quantentunnel.de>
8  */
9 
10 #include "precomp.h"
11 
12 #include "wine/debug.h"
14 
16 
18 NTAPI
23 {
24  TRACE("LsaSpInitialize (0x%p, 0x%p, 0x%p)\n",
27 }
28 
30 NTAPI
32 {
33  TRACE("LsaSpShutDown\n");
35 }
36 
37 /* MS doc says name must be SpAcceptCredentials! */
39 NTAPI
42  _In_ PUNICODE_STRING AccountName,
43  _In_ PSECPKG_PRIMARY_CRED PrimaryCredentials,
44  _In_ PSECPKG_SUPPLEMENTAL_CRED SupplementalCredentials)
45 {
46  TRACE("LsaSpAcceptCredentials(%li %wZ 0x%p 0x%p)\n",
47  LogonType, AccountName, PrimaryCredentials, SupplementalCredentials);
49 }
50 
52 NTAPI
54  _In_ PUNICODE_STRING PrincipalName,
55  _In_ ULONG CredentialUseFlags,
57  _In_ PVOID AuthorizationData,
58  _In_ PVOID GetKeyFunciton,
59  _In_ PVOID GetKeyArgument,
60  _Out_ PLSA_SEC_HANDLE CredentialHandle,
61  _Out_ PTimeStamp ExpirationTime)
62 {
63  TRACE("LsaSpAcquireCredentialsHandle(%wZ 0x%lx 0x%p 0x%p 0x%p 0x%p 0x%p 0x%p)\n",
64  PrincipalName, CredentialUseFlags, LogonId,
65  AuthorizationData, GetKeyFunciton, GetKeyArgument,
66  CredentialHandle, ExpirationTime);
68 }
69 
71 NTAPI
73  _In_ LSA_SEC_HANDLE CredentialHandle,
74  _In_ ULONG CredentialAttribute,
76 {
77  TRACE("LsaSpQueryCredentialsAttributes(0x%p 0x%lx 0x%p)\n",
78  CredentialHandle, CredentialAttribute, Buffer);
80 }
81 
83 NTAPI
85  _In_ LSA_SEC_HANDLE CredentialHandle)
86 {
87  TRACE("LsaSpFreeCredentialsHandle(0x%p)", CredentialHandle);
89 }
90 
92 NTAPI
94  _In_ LSA_SEC_HANDLE CredentialHandle,
95  _In_ PSecBuffer Credentials)
96 {
97  TRACE("LsaSpSaveCredentials(0x%p 0x%p)\n", CredentialHandle, Credentials);
99 }
100 
101 NTSTATUS
102 NTAPI
104  _In_ LSA_SEC_HANDLE CredentialHandle,
105  _Inout_ PSecBuffer Credentials)
106 {
107  TRACE("LsaSpGetCredentials(0x%p 0x%p)\n", CredentialHandle, Credentials);
108  return STATUS_NOT_IMPLEMENTED;
109 }
110 
111 NTSTATUS
112 NTAPI
114  _In_ LSA_SEC_HANDLE CredentialHandle,
116 {
117  TRACE("LsaSpDeleteCredentials(0x%p 0x%p)\n", CredentialHandle, Key);
118  return STATUS_NOT_IMPLEMENTED;
119 }
120 
121 NTSTATUS
122 NTAPI
124  _Out_ PSecPkgInfoW PackageInfo)
125 {
126  TRACE("LsaGetInfo(0x%p)\n", PackageInfo);
127  return STATUS_NOT_IMPLEMENTED;
128 }
129 
130 NTSTATUS
131 NTAPI
133  _In_ LSA_SEC_HANDLE CredentialHandle,
134  _In_ LSA_SEC_HANDLE ContextHandle,
136  _In_ ULONG ContextRequirements,
137  _In_ ULONG TargetDataRep,
138  _In_ PSecBufferDesc InputBuffers,
139  _Out_ PLSA_SEC_HANDLE NewContextHandle,
140  _Inout_ PSecBufferDesc OutputBuffers,
141  _Out_ PULONG ContextAttributes,
142  _Out_ PTimeStamp ExpirationTime,
143  _Out_ PBOOLEAN MappedContext,
144  _Out_ PSecBuffer ContextData)
145 {
146  TRACE("LsaSpInitLsaModeContext(0x%p 0x%p %wZ 0x%lx %i 0x%p 0x%p 0x%p "
147  "0x%p 0x%p 0x%p 0x%p 0x%p 0x%p 0x%p 0x%p)\n",
148  CredentialHandle, ContextHandle, TargetName,
149  ContextRequirements, TargetDataRep, InputBuffers,
150  NewContextHandle, OutputBuffers, ContextAttributes,
151  ExpirationTime, MappedContext, ContextData);
152  return STATUS_NOT_IMPLEMENTED;
153 }
154 
155 NTSTATUS
156 NTAPI
158  _In_ LSA_SEC_HANDLE CredentialHandle,
159  _In_ LSA_SEC_HANDLE ContextHandle,
161  _In_ ULONG ContextRequirements,
162  _In_ ULONG TargetDataRep,
163  _Out_ PLSA_SEC_HANDLE NewContextHandle,
165  _Out_ PULONG ContextAttributes,
166  _Out_ PTimeStamp ExpirationTime,
167  _Out_ PBOOLEAN MappedContext,
168  _Out_ PSecBuffer ContextData)
169 {
170  TRACE("LsaSpAcceptLsaModeContext(0x%p 0x%p 0x%p %i %i 0x%p 0x%p 0x%p "
171  "0x%p 0x%p 0x%p)\n",
172  CredentialHandle, ContextHandle, InputBuffer, ContextRequirements,
173  TargetDataRep, NewContextHandle, OutputBuffer,
174  ContextAttributes, ExpirationTime, MappedContext, ContextData);
175  return STATUS_NOT_IMPLEMENTED;
176 }
177 
178 NTSTATUS
179 NTAPI
181  _In_ LSA_SEC_HANDLE ContextHandle)
182 {
183  TRACE("LsaSpDeleteContext(0x%p)\n", ContextHandle);
184  return STATUS_NOT_IMPLEMENTED;
185 }
186 
187 NTSTATUS
188 NTAPI
190  _In_ LSA_SEC_HANDLE ContextHandle,
191  _In_ PSecBufferDesc ControlToken)
192 {
193  TRACE("LsaSpApplyControlToken(0x%p 0x%p)\n", ContextHandle, ControlToken);
194  return STATUS_NOT_IMPLEMENTED;
195 }
196 
197 NTSTATUS
198 NTAPI
201  _In_ ULONG Flags,
203 {
204  TRACE("LsaSpGetUserInfo(0x%p 0x%lx 0x%p)\n", LogonId, Flags, UserData);
205  return STATUS_NOT_IMPLEMENTED;
206 }
207 
208 NTSTATUS
209 NTAPI
213 {
214  TRACE("LsaSpGetExtendedInformation(0x%lx 0x%p)\n",
215  Class, ppInfo);
216  return STATUS_NOT_IMPLEMENTED;
217 }
218 
219 NTSTATUS
220 NTAPI
224 {
225  TRACE("LsaSpSetExtendedInformation(0x%lx 0x%p)\n",
226  Class, Info);
227  return STATUS_NOT_IMPLEMENTED;
228 }
NTSTATUS NTAPI LsaSpShutDown(VOID)
Definition: lsa.c:31
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:239
NTSTATUS NTAPI LsaSpDeleteContext(_In_ LSA_SEC_HANDLE ContextHandle)
Definition: lsa.c:180
NTSTATUS NTAPI SpInitialize(_In_ ULONG_PTR PackageId, _In_ PSECPKG_PARAMETERS Parameters, _In_ PLSA_SECPKG_FUNCTION_TABLE FunctionTable)
Definition: lsa.c:19
NTSTATUS NTAPI LsaSpDeleteCredentials(_In_ LSA_SEC_HANDLE CredentialHandle, _In_ PSecBuffer Key)
Definition: lsa.c:113
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS NTAPI LsaSpQueryCredentialsAttributes(_In_ LSA_SEC_HANDLE CredentialHandle, _In_ ULONG CredentialAttribute, _Inout_ PVOID Buffer)
Definition: lsa.c:72
struct TraceInfo Info
uint32_t ULONG_PTR
Definition: typedefs.h:65
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
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:40
NTSTATUS NTAPI LsaSpApplyControlToken(_In_ LSA_SEC_HANDLE ContextHandle, _In_ PSecBufferDesc ControlToken)
Definition: lsa.c:189
#define _Out_
Definition: no_sal2.h:323
NTSTATUS NTAPI LsaSpGetInfoW(_Out_ PSecPkgInfoW PackageInfo)
Definition: lsa.c:123
Definition: bufpool.h:45
WINE_DEFAULT_DEBUG_CHANNEL(advapi)
NTSTATUS NTAPI LsaSpSaveCredentials(_In_ LSA_SEC_HANDLE CredentialHandle, _In_ PSecBuffer Credentials)
Definition: lsa.c:93
SECPKG_FUNCTION_TABLE NtlmLsaFn[1]
Definition: lsa.c:15
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:53
NTSTATUS NTAPI LsaSpGetUserInfo(_In_ PLUID LogonId, _In_ ULONG Flags, _Out_ PSecurityUserData *UserData)
Definition: lsa.c:199
#define TRACE(s)
Definition: solgame.cpp:4
enum _SECPKG_EXTENDED_INFORMATION_CLASS SECPKG_EXTENDED_INFORMATION_CLASS
PVOID *typedef PSecBuffer
Definition: ntsecpkg.h:440
CHAR InputBuffer[80]
Definition: conmgr.c:33
#define _Inout_
Definition: no_sal2.h:244
NTSTATUS NTAPI LsaSpGetCredentials(_In_ LSA_SEC_HANDLE CredentialHandle, _Inout_ PSecBuffer Credentials)
Definition: lsa.c:103
char * PBOOLEAN
Definition: retypes.h:11
NTSTATUS NTAPI LsaSpSetExtendedInformation(_In_ SECPKG_EXTENDED_INFORMATION_CLASS Class, _In_ PSECPKG_EXTENDED_INFORMATION Info)
Definition: lsa.c:221
_In_ PPCI_DEVICE_PRESENCE_PARAMETERS Parameters
Definition: iotypes.h:887
ULONG * PLSA_SEC_HANDLE
Definition: ntsecpkg.h:208
ULONG LSA_SEC_HANDLE
Definition: ntsecpkg.h:208
WCHAR TargetName[256]
Definition: arping.c:27
#define _In_
Definition: no_sal2.h:204
_In_ ULONG _In_opt_ WDFREQUEST _In_opt_ PVOID _In_ size_t _In_ PVOID OutputBuffer
Definition: cdrom.h:1437
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:132
_IRQL_requires_same_ _In_ PLSA_STRING _In_ SECURITY_LOGON_TYPE LogonType
enum _SECURITY_LOGON_TYPE SECURITY_LOGON_TYPE
unsigned int * PULONG
Definition: retypes.h:1
_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
unsigned int ULONG
Definition: retypes.h:1
NTSTATUS NTAPI LsaSpFreeCredentialsHandle(_In_ LSA_SEC_HANDLE CredentialHandle)
Definition: lsa.c:84
static WLX_DISPATCH_VERSION_1_4 FunctionTable
Definition: wlx.c:736
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:157
static ULONG PackageId
Definition: authpackage.c:163
NTSTATUS NTAPI LsaSpGetExtendedInformation(_In_ SECPKG_EXTENDED_INFORMATION_CLASS Class, _Out_ PSECPKG_EXTENDED_INFORMATION *ppInfo)
Definition: lsa.c:210