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