mirror of
https://github.com/reactos/reactos.git
synced 2025-04-22 13:10:39 +00:00
[SYSSETUP] SamQueryInformationUser expects a pointer
This commit is contained in:
parent
e264c3b3f2
commit
4885c34fa8
1 changed files with 7 additions and 4 deletions
|
@ -1154,7 +1154,7 @@ EnableAccount(
|
||||||
{
|
{
|
||||||
INFCONTEXT InfContext;
|
INFCONTEXT InfContext;
|
||||||
SAM_HANDLE UserHandle = NULL;
|
SAM_HANDLE UserHandle = NULL;
|
||||||
USER_CONTROL_INFORMATION ControlInfo;
|
PUSER_CONTROL_INFORMATION ControlInfo = NULL;
|
||||||
INT nValue = 0;
|
INT nValue = 0;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
@ -1195,22 +1195,25 @@ EnableAccount(
|
||||||
|
|
||||||
if (nValue == 0)
|
if (nValue == 0)
|
||||||
{
|
{
|
||||||
ControlInfo.UserAccountControl |= USER_ACCOUNT_DISABLED;
|
ControlInfo->UserAccountControl |= USER_ACCOUNT_DISABLED;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ControlInfo.UserAccountControl &= ~USER_ACCOUNT_DISABLED;
|
ControlInfo->UserAccountControl &= ~USER_ACCOUNT_DISABLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = SamSetInformationUser(UserHandle,
|
Status = SamSetInformationUser(UserHandle,
|
||||||
UserControlInformation,
|
UserControlInformation,
|
||||||
(PVOID)&ControlInfo);
|
ControlInfo);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("SamSetInformationUser() failed (Status: 0x%08lx)\n", Status);
|
DPRINT1("SamSetInformationUser() failed (Status: 0x%08lx)\n", Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
if (ControlInfo != NULL)
|
||||||
|
SamFreeMemory(ControlInfo);
|
||||||
|
|
||||||
if (UserHandle != NULL)
|
if (UserHandle != NULL)
|
||||||
SamCloseHandle(UserHandle);
|
SamCloseHandle(UserHandle);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue