Author: pschweitzer
Date: Sun May 5 20:01:14 2013
New Revision: 58953
URL:
http://svn.reactos.org/svn/reactos?rev=58953&view=rev
Log:
[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.
Modified:
trunk/reactos/dll/win32/kernel32/client/time.c
Modified: trunk/reactos/dll/win32/kernel32/client/time.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/time.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/time.c [iso-8859-1] Sun May 5 20:01:14 2013
@@ -386,7 +386,7 @@
}
else
{
- DPRINT1("Workaround RtlAcquirePrivilege failure!\n");
+ DPRINT1("HACK: Workaround RtlAcquirePrivilege failure! Remove me once RAP is
fine\n");
Status = NtSetSystemTime(&NewSystemTime, NULL);
}
@@ -427,11 +427,15 @@
}
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))