Validates a user by checking if it exists in the sam database. Some other checks are done further.
471{
475
477
478 *SpecialAccount =
FALSE;
481
482
483
485 {
486 *SpecialAccount =
TRUE;
487
488
491 {
492 ERR(
"GetNtAuthorityDomainSid() failed (Status 0x%08lx)\n",
Status);
494 }
495
497 {
498 TRACE(
"SpecialAccount: LocalService\n");
499
502
506 if (*UserInfoPtr ==
NULL)
508
511 }
513 {
514 TRACE(
"SpecialAccount: NetworkService\n");
515
518
522 if (*UserInfoPtr ==
NULL)
524
527 }
528 else
529 {
531 }
532 }
533 else
534 {
535 TRACE(
"NormalAccount\n");
537 LogonPwdData,
538 ComputerName,
539 AccountDomainSidPtr,
540 UserHandlePtr,
541 UserInfoPtr,
544 {
545 ERR(
"SamValidateNormalUser() failed (Status 0x%08lx)\n",
Status);
547 }
548 }
549
551}
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
#define NT_SUCCESS(StatCode)
NTSYSAPI BOOLEAN NTAPI RtlEqualUnicodeString(PUNICODE_STRING String1, PUNICODE_STRING String2, BOOLEAN CaseInSensitive)
_IRQL_requires_same_ _In_ PLSA_STRING _In_ SECURITY_LOGON_TYPE LogonType
_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 _Out_ PHANDLE _Out_ PQUOTA_LIMITS _Out_ PNTSTATUS SubStatus
#define STATUS_NO_SUCH_USER
#define STATUS_LOGON_FAILURE
static NTSTATUS GetNtAuthorityDomainSid(_In_ PRPC_SID *Sid)
static NTSTATUS SamValidateNormalUser(_In_ PUNICODE_STRING UserName, _In_ PLSA_SAM_PWD_DATA PwdData, _In_ PUNICODE_STRING ComputerName, _Out_ PRPC_SID *AccountDomainSidPtr, _Out_ SAMPR_HANDLE *UserHandlePtr, _Out_ PSAMPR_USER_INFO_BUFFER *UserInfoPtr, _Out_ PNTSTATUS SubStatus)
#define RTL_CONSTANT_STRING(s)
#define STATUS_INSUFFICIENT_RESOURCES
#define SECURITY_LOCAL_SERVICE_RID
#define SECURITY_NETWORK_SERVICE_RID