[SYSSETUP] SamQueryInformationUser expects a pointer

This commit is contained in:
Mark Jansen 2021-03-20 00:28:07 +01:00
parent e264c3b3f2
commit 4885c34fa8
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B

View file

@ -1154,7 +1154,7 @@ EnableAccount(
{
INFCONTEXT InfContext;
SAM_HANDLE UserHandle = NULL;
USER_CONTROL_INFORMATION ControlInfo;
PUSER_CONTROL_INFORMATION ControlInfo = NULL;
INT nValue = 0;
NTSTATUS Status;
@ -1195,22 +1195,25 @@ EnableAccount(
if (nValue == 0)
{
ControlInfo.UserAccountControl |= USER_ACCOUNT_DISABLED;
ControlInfo->UserAccountControl |= USER_ACCOUNT_DISABLED;
}
else
{
ControlInfo.UserAccountControl &= ~USER_ACCOUNT_DISABLED;
ControlInfo->UserAccountControl &= ~USER_ACCOUNT_DISABLED;
}
Status = SamSetInformationUser(UserHandle,
UserControlInformation,
(PVOID)&ControlInfo);
ControlInfo);
if (!NT_SUCCESS(Status))
{
DPRINT1("SamSetInformationUser() failed (Status: 0x%08lx)\n", Status);
}
done:
if (ControlInfo != NULL)
SamFreeMemory(ControlInfo);
if (UserHandle != NULL)
SamCloseHandle(UserHandle);
}