xref: /reactos/dll/win32/msv1_0/lsa.h (revision 99dcd6f7)
1f95c96e2SAndreas Maier /*
2f95c96e2SAndreas Maier  * PROJECT:     Authentication Package DLL
3*0901077fSAndreas Maier  * LICENSE:     GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4*0901077fSAndreas Maier  * PURPOSE:     Header for lsa.c
5f95c96e2SAndreas Maier  * COPYRIGHT:   Copyright 2019-2020 Andreas Maier <staubim@quantentunnel.de>
6f95c96e2SAndreas Maier  */
7f95c96e2SAndreas Maier 
8*0901077fSAndreas Maier #pragma once
9f95c96e2SAndreas Maier 
10f95c96e2SAndreas Maier NTSTATUS
11f95c96e2SAndreas Maier NTAPI
12f95c96e2SAndreas Maier SpInitialize(
13f95c96e2SAndreas Maier     _In_ ULONG_PTR PackageId,
14f95c96e2SAndreas Maier     _In_ PSECPKG_PARAMETERS Parameters,
15f95c96e2SAndreas Maier     _In_ PLSA_SECPKG_FUNCTION_TABLE FunctionTable);
16f95c96e2SAndreas Maier 
17f95c96e2SAndreas Maier NTSTATUS
18f95c96e2SAndreas Maier NTAPI
19f95c96e2SAndreas Maier LsaSpShutDown(VOID);
20f95c96e2SAndreas Maier 
21f95c96e2SAndreas Maier NTSTATUS
22f95c96e2SAndreas Maier NTAPI
23f95c96e2SAndreas Maier SpAcceptCredentials(
24f95c96e2SAndreas Maier     _In_ SECURITY_LOGON_TYPE LogonType,
25f95c96e2SAndreas Maier     _In_ PUNICODE_STRING AccountName,
26f95c96e2SAndreas Maier     _In_ PSECPKG_PRIMARY_CRED PrimaryCredentials,
27f95c96e2SAndreas Maier     _In_ PSECPKG_SUPPLEMENTAL_CRED SupplementalCredentials);
28f95c96e2SAndreas Maier 
29f95c96e2SAndreas Maier NTSTATUS
30f95c96e2SAndreas Maier NTAPI
31f95c96e2SAndreas Maier LsaSpAcquireCredentialsHandle(
32f95c96e2SAndreas Maier     _In_ PUNICODE_STRING PrincipalName,
33f95c96e2SAndreas Maier     _In_ ULONG CredentialUseFlags,
34f95c96e2SAndreas Maier     _In_ PLUID LogonId,
35f95c96e2SAndreas Maier     _In_ PVOID AuthorizationData,
36f95c96e2SAndreas Maier     _In_ PVOID GetKeyFunciton,
37f95c96e2SAndreas Maier     _In_ PVOID GetKeyArgument,
38f95c96e2SAndreas Maier     _Out_ PLSA_SEC_HANDLE CredentialHandle,
39f95c96e2SAndreas Maier     _Out_ PTimeStamp ExpirationTime);
40f95c96e2SAndreas Maier 
41f95c96e2SAndreas Maier NTSTATUS
42f95c96e2SAndreas Maier NTAPI
43f95c96e2SAndreas Maier LsaSpQueryCredentialsAttributes(
44f95c96e2SAndreas Maier     _In_ LSA_SEC_HANDLE CredentialHandle,
45f95c96e2SAndreas Maier     _In_ ULONG CredentialAttribute,
46f95c96e2SAndreas Maier     _Inout_ PVOID Buffer);
47f95c96e2SAndreas Maier 
48f95c96e2SAndreas Maier NTSTATUS
49f95c96e2SAndreas Maier NTAPI
50f95c96e2SAndreas Maier LsaSpFreeCredentialsHandle(
51f95c96e2SAndreas Maier     _In_ LSA_SEC_HANDLE CredentialHandle);
52f95c96e2SAndreas Maier 
53f95c96e2SAndreas Maier NTSTATUS
54f95c96e2SAndreas Maier NTAPI
55f95c96e2SAndreas Maier LsaSpSaveCredentials(
56f95c96e2SAndreas Maier     _In_ LSA_SEC_HANDLE CredentialHandle,
57f95c96e2SAndreas Maier     _In_ PSecBuffer Credentials);
58f95c96e2SAndreas Maier 
59f95c96e2SAndreas Maier NTSTATUS
60f95c96e2SAndreas Maier NTAPI
61f95c96e2SAndreas Maier LsaSpGetCredentials(
62f95c96e2SAndreas Maier     _In_ LSA_SEC_HANDLE CredentialHandle,
63f95c96e2SAndreas Maier     _Inout_ PSecBuffer Credentials);
64f95c96e2SAndreas Maier 
65f95c96e2SAndreas Maier NTSTATUS
66f95c96e2SAndreas Maier NTAPI
67f95c96e2SAndreas Maier LsaSpDeleteCredentials(
68f95c96e2SAndreas Maier     _In_ LSA_SEC_HANDLE CredentialHandle,
69f95c96e2SAndreas Maier     _In_ PSecBuffer Key);
70f95c96e2SAndreas Maier 
71f95c96e2SAndreas Maier NTSTATUS
72f95c96e2SAndreas Maier NTAPI
73f95c96e2SAndreas Maier LsaSpGetInfoW(
74f95c96e2SAndreas Maier     _Out_ PSecPkgInfoW PackageInfo);
75f95c96e2SAndreas Maier 
76f95c96e2SAndreas Maier NTSTATUS
77f95c96e2SAndreas Maier NTAPI
78f95c96e2SAndreas Maier LsaSpInitLsaModeContext(
79f95c96e2SAndreas Maier     _In_ LSA_SEC_HANDLE CredentialHandle,
80f95c96e2SAndreas Maier     _In_ LSA_SEC_HANDLE ContextHandle,
81f95c96e2SAndreas Maier     _In_ PUNICODE_STRING TargetName,
82f95c96e2SAndreas Maier     _In_ ULONG ContextRequirements,
83f95c96e2SAndreas Maier     _In_ ULONG TargetDataRep,
84f95c96e2SAndreas Maier     _In_ PSecBufferDesc InputBuffers,
85f95c96e2SAndreas Maier     _Out_ PLSA_SEC_HANDLE NewContextHandle,
86f95c96e2SAndreas Maier     _Inout_ PSecBufferDesc OutputBuffers,
87f95c96e2SAndreas Maier     _Out_ PULONG ContextAttributes,
88f95c96e2SAndreas Maier     _Out_ PTimeStamp ExpirationTime,
89f95c96e2SAndreas Maier     _Out_ PBOOLEAN MappedContext,
90f95c96e2SAndreas Maier     _Out_ PSecBuffer ContextData);
91f95c96e2SAndreas Maier 
92f95c96e2SAndreas Maier NTSTATUS
93f95c96e2SAndreas Maier NTAPI
94f95c96e2SAndreas Maier LsaSpAcceptLsaModeContext(
95f95c96e2SAndreas Maier     _In_ LSA_SEC_HANDLE CredentialHandle,
96f95c96e2SAndreas Maier     _In_ LSA_SEC_HANDLE ContextHandle,
97f95c96e2SAndreas Maier     _In_ PSecBufferDesc InputBuffer,
98f95c96e2SAndreas Maier     _In_ ULONG ContextRequirements,
99f95c96e2SAndreas Maier     _In_ ULONG TargetDataRep,
100f95c96e2SAndreas Maier     _Out_ PLSA_SEC_HANDLE NewContextHandle,
101f95c96e2SAndreas Maier     _Inout_ PSecBufferDesc OutputBuffer,
102f95c96e2SAndreas Maier     _Out_ PULONG ContextAttributes,
103f95c96e2SAndreas Maier     _Out_ PTimeStamp ExpirationTime,
104f95c96e2SAndreas Maier     _Out_ PBOOLEAN MappedContext,
105f95c96e2SAndreas Maier     _Out_ PSecBuffer ContextData);
106f95c96e2SAndreas Maier 
107f95c96e2SAndreas Maier NTSTATUS
108f95c96e2SAndreas Maier NTAPI
109f95c96e2SAndreas Maier LsaSpDeleteContext(
110f95c96e2SAndreas Maier     _In_ LSA_SEC_HANDLE ContextHandle);
111f95c96e2SAndreas Maier 
112f95c96e2SAndreas Maier NTSTATUS
113f95c96e2SAndreas Maier NTAPI
114f95c96e2SAndreas Maier LsaSpApplyControlToken(
115f95c96e2SAndreas Maier     _In_ LSA_SEC_HANDLE ContextHandle,
116f95c96e2SAndreas Maier     _In_ PSecBufferDesc ControlToken);
117f95c96e2SAndreas Maier 
118f95c96e2SAndreas Maier NTSTATUS
119f95c96e2SAndreas Maier NTAPI
120f95c96e2SAndreas Maier LsaSpGetUserInfo(
121f95c96e2SAndreas Maier     _In_ PLUID LogonId,
122f95c96e2SAndreas Maier     _In_ ULONG Flags,
123f95c96e2SAndreas Maier     _Out_ PSecurityUserData *UserData);
124f95c96e2SAndreas Maier 
125f95c96e2SAndreas Maier NTSTATUS
126f95c96e2SAndreas Maier NTAPI
127f95c96e2SAndreas Maier LsaSpGetExtendedInformation(
128f95c96e2SAndreas Maier     _In_ SECPKG_EXTENDED_INFORMATION_CLASS Class,
129f95c96e2SAndreas Maier     _Out_ PSECPKG_EXTENDED_INFORMATION *ppInfo);
130f95c96e2SAndreas Maier 
131f95c96e2SAndreas Maier NTSTATUS
132f95c96e2SAndreas Maier NTAPI
133f95c96e2SAndreas Maier LsaSpSetExtendedInformation(
134f95c96e2SAndreas Maier     _In_ SECPKG_EXTENDED_INFORMATION_CLASS Class,
135f95c96e2SAndreas Maier     _In_ PSECPKG_EXTENDED_INFORMATION Info);
136