1 /* 2 * PROJECT: Authentication Package DLL 3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) 4 * PURPOSE: Security Account Manager (SAM) related functions - header 5 * COPYRIGHT: Copyright 2013 Eric Kohl <eric.kohl@reactos.org> 6 */ 7 8 #pragma once 9 10 typedef enum _LSA_SAM_NETLOGON_TYPE 11 { 12 NetLogonAnonymous = 0, 13 NetLogonLmKey, 14 NetLogonNtKey 15 } LSA_SAM_NETLOGON_TYPE; 16 17 typedef struct _LSA_SAM_PWD_DATA 18 { 19 /* TRUE: PlainPwd is filled, 20 FALSE: LmPwd and NtPwd is filled */ 21 BOOL IsNetwork; 22 PUNICODE_STRING PlainPwd; 23 24 /* Input (IsNetwork = TRUE) */ 25 PMSV1_0_LM20_LOGON LogonInfo; 26 PUNICODE_STRING ComputerName; 27 /* Result (IsNetwork = TRUE) */ 28 LSA_SAM_NETLOGON_TYPE LogonType; 29 LANMAN_SESSION_KEY LanmanSessionKey; 30 USER_SESSION_KEY UserSessionKey; 31 } LSA_SAM_PWD_DATA, *PLSA_SAM_PWD_DATA; 32 33 /** 34 * @brief Validates a user by checking if it exists in the sam database. 35 * Some other checks are done further. 36 */ 37 NTSTATUS 38 SamValidateUser( 39 _In_ SECURITY_LOGON_TYPE LogonType, 40 _In_ PUNICODE_STRING LogonUserName, 41 _In_ PUNICODE_STRING LogonDomain, 42 _In_ PLSA_SAM_PWD_DATA LogonPwdData, 43 _In_ PUNICODE_STRING ComputerName, 44 _Out_ PBOOL SpecialAccount, 45 _Out_ PRPC_SID* AccountDomainSidPtr, 46 _Out_ SAMPR_HANDLE* UserHandlePtr, 47 _Out_ PSAMPR_USER_INFO_BUFFER* UserInfoPtr, 48 _Out_ PNTSTATUS SubStatus); 49