mirror of
https://github.com/reactos/reactos.git
synced 2024-07-21 03:37:57 +00:00
[KERNEL32]
If you workaround RtlAcquirePrivilege, do it properly! Will prevent bad address freeing... svn path=/trunk/; revision=58945
This commit is contained in:
parent
5d4c6981e0
commit
3c4b46ea62
|
@ -379,12 +379,16 @@ SetLocalTime(IN CONST SYSTEMTIME *lpSystemTime)
|
|||
NewSystemTime.QuadPart += TimeZoneBias.QuadPart;
|
||||
|
||||
Status = RtlAcquirePrivilege(&Privilege, 1, 0, &State);
|
||||
Status = STATUS_SUCCESS;
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
Status = NtSetSystemTime(&NewSystemTime, NULL);
|
||||
RtlReleasePrivilege(State);
|
||||
}
|
||||
else
|
||||
{
|
||||
DPRINT1("Workaround RtlAcquirePrivilege failure!\n");
|
||||
Status = NtSetSystemTime(&NewSystemTime, NULL);
|
||||
}
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue