mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
[KERNEL32]
Also "fix" hack of RtlAcquirePrivilege in SetSystemTime(). Spotted by Thomas. Note for syssetup/rtl/kernel32 devs: Make it crystal clear that this is a hack and has to be deleted once RAP is fine. Also note that for SetLocalTime() and 2nd stage, syssetup acquires the privilege itself in SetSystemLocalTime() before calling SetLocalTime(). This will also have to be deleted once RAP is working fine. Otherwise it will keep failing: it is not possible to acquire a privilege already held. svn path=/trunk/; revision=58953
This commit is contained in:
parent
9818ea06e5
commit
648e8504fc
1 changed files with 6 additions and 2 deletions
|
@ -386,7 +386,7 @@ SetLocalTime(IN CONST SYSTEMTIME *lpSystemTime)
|
|||
}
|
||||
else
|
||||
{
|
||||
DPRINT1("Workaround RtlAcquirePrivilege failure!\n");
|
||||
DPRINT1("HACK: Workaround RtlAcquirePrivilege failure! Remove me once RAP is fine\n");
|
||||
Status = NtSetSystemTime(&NewSystemTime, NULL);
|
||||
}
|
||||
|
||||
|
@ -427,12 +427,16 @@ SetSystemTime(IN CONST SYSTEMTIME *lpSystemTime)
|
|||
}
|
||||
|
||||
Status = RtlAcquirePrivilege(&Privilege, 1, 0, &State);
|
||||
Status = STATUS_SUCCESS;
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
Status = NtSetSystemTime(&NewSystemTime, NULL);
|
||||
RtlReleasePrivilege(State);
|
||||
}
|
||||
else
|
||||
{
|
||||
DPRINT1("HACK: Workaround RtlAcquirePrivilege failure! Remove me once RAP is fine\n");
|
||||
Status = NtSetSystemTime(&NewSystemTime, NULL);
|
||||
}
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue