xref: /reactos/dll/win32/msv1_0/lsa.c (revision 03422451)
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"
11 WINE_DEFAULT_DEBUG_CHANNEL(msv1_0);
12 
13 
14 NTSTATUS
15 NTAPI
SpInitialize(_In_ ULONG_PTR PackageId,_In_ PSECPKG_PARAMETERS Parameters,_In_ PLSA_SECPKG_FUNCTION_TABLE FunctionTable)16 SpInitialize(
17     _In_ ULONG_PTR PackageId,
18     _In_ PSECPKG_PARAMETERS Parameters,
19     _In_ PLSA_SECPKG_FUNCTION_TABLE FunctionTable)
20 {
21     TRACE("LsaSpInitialize (0x%p, 0x%p, 0x%p)\n",
22           PackageId, Parameters, FunctionTable);
23     return STATUS_NOT_IMPLEMENTED;
24 }
25 
26 NTSTATUS
27 NTAPI
LsaSpShutDown(VOID)28 LsaSpShutDown(VOID)
29 {
30     TRACE("LsaSpShutDown\n");
31     return STATUS_NOT_IMPLEMENTED;
32 }
33 
34 /* MS doc says name must be SpAcceptCredentials! */
35 NTSTATUS
36 NTAPI
SpAcceptCredentials(_In_ SECURITY_LOGON_TYPE LogonType,_In_ PUNICODE_STRING AccountName,_In_ PSECPKG_PRIMARY_CRED PrimaryCredentials,_In_ PSECPKG_SUPPLEMENTAL_CRED SupplementalCredentials)37 SpAcceptCredentials(
38     _In_ SECURITY_LOGON_TYPE LogonType,
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);
45     return STATUS_NOT_IMPLEMENTED;
46 }
47 
48 NTSTATUS
49 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)50 LsaSpAcquireCredentialsHandle(
51     _In_ PUNICODE_STRING PrincipalName,
52     _In_ ULONG CredentialUseFlags,
53     _In_ PLUID LogonId,
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);
64     return STATUS_NOT_IMPLEMENTED;
65 }
66 
67 NTSTATUS
68 NTAPI
LsaSpQueryCredentialsAttributes(_In_ LSA_SEC_HANDLE CredentialHandle,_In_ ULONG CredentialAttribute,_Inout_ PVOID Buffer)69 LsaSpQueryCredentialsAttributes(
70     _In_ LSA_SEC_HANDLE CredentialHandle,
71     _In_ ULONG CredentialAttribute,
72     _Inout_ PVOID Buffer)
73 {
74     TRACE("LsaSpQueryCredentialsAttributes(0x%p 0x%lx 0x%p)\n",
75           CredentialHandle, CredentialAttribute, Buffer);
76     return STATUS_NOT_IMPLEMENTED;
77 }
78 
79 NTSTATUS
80 NTAPI
LsaSpFreeCredentialsHandle(_In_ LSA_SEC_HANDLE CredentialHandle)81 LsaSpFreeCredentialsHandle(
82     _In_ LSA_SEC_HANDLE CredentialHandle)
83 {
84     TRACE("LsaSpFreeCredentialsHandle(0x%p)\n", CredentialHandle);
85     return STATUS_NOT_IMPLEMENTED;
86 }
87 
88 NTSTATUS
89 NTAPI
LsaSpSaveCredentials(_In_ LSA_SEC_HANDLE CredentialHandle,_In_ PSecBuffer Credentials)90 LsaSpSaveCredentials(
91     _In_ LSA_SEC_HANDLE CredentialHandle,
92     _In_ PSecBuffer Credentials)
93 {
94     TRACE("LsaSpSaveCredentials(0x%p 0x%p)\n", CredentialHandle, Credentials);
95     return STATUS_NOT_IMPLEMENTED;
96 }
97 
98 NTSTATUS
99 NTAPI
LsaSpGetCredentials(_In_ LSA_SEC_HANDLE CredentialHandle,_Inout_ PSecBuffer Credentials)100 LsaSpGetCredentials(
101     _In_ LSA_SEC_HANDLE CredentialHandle,
102     _Inout_ PSecBuffer Credentials)
103 {
104     TRACE("LsaSpGetCredentials(0x%p 0x%p)\n", CredentialHandle, Credentials);
105     return STATUS_NOT_IMPLEMENTED;
106 }
107 
108 NTSTATUS
109 NTAPI
LsaSpDeleteCredentials(_In_ LSA_SEC_HANDLE CredentialHandle,_In_ PSecBuffer Key)110 LsaSpDeleteCredentials(
111     _In_ LSA_SEC_HANDLE CredentialHandle,
112     _In_ PSecBuffer Key)
113 {
114     TRACE("LsaSpDeleteCredentials(0x%p 0x%p)\n", CredentialHandle, Key);
115     return STATUS_NOT_IMPLEMENTED;
116 }
117 
118 NTSTATUS
119 NTAPI
LsaSpGetInfoW(_Out_ PSecPkgInfoW PackageInfo)120 LsaSpGetInfoW(
121     _Out_ PSecPkgInfoW PackageInfo)
122 {
123     TRACE("LsaGetInfo(0x%p)\n", PackageInfo);
124     return STATUS_NOT_IMPLEMENTED;
125 }
126 
127 NTSTATUS
128 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)129 LsaSpInitLsaModeContext(
130     _In_ LSA_SEC_HANDLE CredentialHandle,
131     _In_ LSA_SEC_HANDLE ContextHandle,
132     _In_ PUNICODE_STRING TargetName,
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);
149     return STATUS_NOT_IMPLEMENTED;
150 }
151 
152 NTSTATUS
153 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)154 LsaSpAcceptLsaModeContext(
155     _In_ LSA_SEC_HANDLE CredentialHandle,
156     _In_ LSA_SEC_HANDLE ContextHandle,
157     _In_ PSecBufferDesc InputBuffer,
158     _In_ ULONG ContextRequirements,
159     _In_ ULONG TargetDataRep,
160     _Out_ PLSA_SEC_HANDLE NewContextHandle,
161     _Inout_ PSecBufferDesc OutputBuffer,
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);
172     return STATUS_NOT_IMPLEMENTED;
173 }
174 
175 NTSTATUS
176 NTAPI
LsaSpDeleteContext(_In_ LSA_SEC_HANDLE ContextHandle)177 LsaSpDeleteContext(
178     _In_ LSA_SEC_HANDLE ContextHandle)
179 {
180     TRACE("LsaSpDeleteContext(0x%p)\n", ContextHandle);
181     return STATUS_NOT_IMPLEMENTED;
182 }
183 
184 NTSTATUS
185 NTAPI
LsaSpApplyControlToken(_In_ LSA_SEC_HANDLE ContextHandle,_In_ PSecBufferDesc ControlToken)186 LsaSpApplyControlToken(
187     _In_ LSA_SEC_HANDLE ContextHandle,
188     _In_ PSecBufferDesc ControlToken)
189 {
190     TRACE("LsaSpApplyControlToken(0x%p 0x%p)\n", ContextHandle, ControlToken);
191     return STATUS_NOT_IMPLEMENTED;
192 }
193 
194 NTSTATUS
195 NTAPI
LsaSpGetUserInfo(_In_ PLUID LogonId,_In_ ULONG Flags,_Out_ PSecurityUserData * UserData)196 LsaSpGetUserInfo(
197     _In_ PLUID LogonId,
198     _In_ ULONG Flags,
199     _Out_ PSecurityUserData *UserData)
200 {
201     TRACE("LsaSpGetUserInfo(0x%p 0x%lx 0x%p)\n", LogonId, Flags, UserData);
202     return STATUS_NOT_IMPLEMENTED;
203 }
204 
205 NTSTATUS
206 NTAPI
LsaSpGetExtendedInformation(_In_ SECPKG_EXTENDED_INFORMATION_CLASS Class,_Out_ PSECPKG_EXTENDED_INFORMATION * ppInfo)207 LsaSpGetExtendedInformation(
208     _In_ SECPKG_EXTENDED_INFORMATION_CLASS Class,
209     _Out_ PSECPKG_EXTENDED_INFORMATION *ppInfo)
210 {
211     TRACE("LsaSpGetExtendedInformation(0x%lx 0x%p)\n",
212           Class, ppInfo);
213     return STATUS_NOT_IMPLEMENTED;
214 }
215 
216 NTSTATUS
217 NTAPI
LsaSpSetExtendedInformation(_In_ SECPKG_EXTENDED_INFORMATION_CLASS Class,_In_ PSECPKG_EXTENDED_INFORMATION Info)218 LsaSpSetExtendedInformation(
219     _In_ SECPKG_EXTENDED_INFORMATION_CLASS Class,
220     _In_ PSECPKG_EXTENDED_INFORMATION Info)
221 {
222     TRACE("LsaSpSetExtendedInformation(0x%lx 0x%p)\n",
223           Class, Info);
224     return STATUS_NOT_IMPLEMENTED;
225 }
226