mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 21:16:04 +00:00
[SAMSRV] Implement SamrQueryInformationUser.UserInternal2Information
This commit is contained in:
parent
c7415b3faa
commit
653a9be05b
1 changed files with 54 additions and 0 deletions
|
@ -6738,6 +6738,54 @@ done:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static
|
||||||
|
NTSTATUS
|
||||||
|
SampQueryUserInternal2(PSAM_DB_OBJECT UserObject,
|
||||||
|
PSAMPR_USER_INFO_BUFFER *Buffer)
|
||||||
|
{
|
||||||
|
PSAMPR_USER_INFO_BUFFER InfoBuffer = NULL;
|
||||||
|
SAM_USER_FIXED_DATA FixedData;
|
||||||
|
ULONG Length = 0;
|
||||||
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
*Buffer = NULL;
|
||||||
|
|
||||||
|
InfoBuffer = midl_user_allocate(sizeof(SAMPR_USER_INFO_BUFFER));
|
||||||
|
if (InfoBuffer == NULL)
|
||||||
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
|
|
||||||
|
Length = sizeof(SAM_USER_FIXED_DATA);
|
||||||
|
Status = SampGetObjectAttribute(UserObject,
|
||||||
|
L"F",
|
||||||
|
NULL,
|
||||||
|
(PVOID)&FixedData,
|
||||||
|
&Length);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
goto done;
|
||||||
|
|
||||||
|
InfoBuffer->Internal2.Flags = 0;
|
||||||
|
InfoBuffer->Internal2.LastLogon.LowPart = FixedData.LastLogon.LowPart;
|
||||||
|
InfoBuffer->Internal2.LastLogon.HighPart = FixedData.LastLogon.HighPart;
|
||||||
|
InfoBuffer->Internal2.LastLogoff.LowPart = FixedData.LastLogoff.LowPart;
|
||||||
|
InfoBuffer->Internal2.LastLogoff.HighPart = FixedData.LastLogoff.HighPart;
|
||||||
|
InfoBuffer->Internal2.BadPasswordCount = FixedData.BadPasswordCount;
|
||||||
|
InfoBuffer->Internal2.LogonCount = FixedData.LogonCount;
|
||||||
|
|
||||||
|
*Buffer = InfoBuffer;
|
||||||
|
|
||||||
|
done:
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
if (InfoBuffer != NULL)
|
||||||
|
{
|
||||||
|
midl_user_free(InfoBuffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static NTSTATUS
|
static NTSTATUS
|
||||||
SampQueryUserParameters(PSAM_DB_OBJECT UserObject,
|
SampQueryUserParameters(PSAM_DB_OBJECT UserObject,
|
||||||
PSAMPR_USER_INFO_BUFFER *Buffer)
|
PSAMPR_USER_INFO_BUFFER *Buffer)
|
||||||
|
@ -7315,6 +7363,7 @@ SamrQueryInformationUser(IN SAMPR_HANDLE UserHandle,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case UserInternal1Information:
|
case UserInternal1Information:
|
||||||
|
case UserInternal2Information:
|
||||||
case UserAllInformation:
|
case UserAllInformation:
|
||||||
DesiredAccess = 0;
|
DesiredAccess = 0;
|
||||||
break;
|
break;
|
||||||
|
@ -7423,6 +7472,11 @@ SamrQueryInformationUser(IN SAMPR_HANDLE UserHandle,
|
||||||
Buffer);
|
Buffer);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case UserInternal2Information:
|
||||||
|
Status = SampQueryUserInternal2(UserObject,
|
||||||
|
Buffer);
|
||||||
|
break;
|
||||||
|
|
||||||
case UserParametersInformation:
|
case UserParametersInformation:
|
||||||
Status = SampQueryUserParameters(UserObject,
|
Status = SampQueryUserParameters(UserObject,
|
||||||
Buffer);
|
Buffer);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue