Author: ekohl
Date: Wed May 15 22:01:07 2013
New Revision: 59021
URL:
http://svn.reactos.org/svn/reactos?rev=59021&view=rev
Log:
[SYSSETUP]
Enable the restore privilege before the call to NtUnloadKey. Disable it immediately after
the call to NtUnloadKey.
Modified:
trunk/reactos/dll/win32/syssetup/install.c
Modified: trunk/reactos/dll/win32/syssetup/install.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/install…
==============================================================================
--- trunk/reactos/dll/win32/syssetup/install.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/syssetup/install.c [iso-8859-1] Wed May 15 22:01:07 2013
@@ -915,11 +915,14 @@
return 0;
}
- SetPrivilege(SE_RESTORE_NAME, SE_PRIVILEGE_ENABLED);
-
/* ROS HACK, as long as NtUnloadKey is not implemented */
{
- NTSTATUS Status = NtUnloadKey(NULL);
+ NTSTATUS Status;
+
+ SetPrivilege(SE_RESTORE_NAME, SE_PRIVILEGE_ENABLED);
+ Status = NtUnloadKey(NULL);
+ SetPrivilege(SE_RESTORE_NAME, 0);
+
if (Status == STATUS_NOT_IMPLEMENTED)
{
/* Create the Administrator profile */
@@ -947,8 +950,6 @@
}
/* END OF ROS HACK */
- SetPrivilege(SE_RESTORE_NAME, 0);
-
SetupCloseInfFile(hSysSetupInf);
SetSetupType(0);