mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 13:35:47 +00:00
[SERVICES] Grant ReactOS Setup component SYSTEM access
ReactOS Setup is an integral component that is part of the operating system responsible for the installation of ROS during 2nd installation stage. The situation with current master branch is like this -- the Services component always tries to create the process on behalf of the logged in user with its own security context. That user doesn't have the privileges and access rights like SYSTEM thus the Services component tries to create the process but it fails to do so because of lacking of required access right, TOKEN_DUPLICATE, in order for the calling thread to impersonate as self.
This commit is contained in:
parent
cd1070dfc4
commit
f340524ea4
3 changed files with 26 additions and 1 deletions
|
@ -28,6 +28,7 @@ int WINAPI RegisterServicesProcess(DWORD ServicesProcessId);
|
|||
BOOL ScmInitialize = FALSE;
|
||||
BOOL ScmShutdown = FALSE;
|
||||
BOOL ScmLiveSetup = FALSE;
|
||||
BOOL ScmSetupInProgress = FALSE;
|
||||
static HANDLE hScmShutdownEvent = NULL;
|
||||
static HANDLE hScmSecurityServicesEvent = NULL;
|
||||
|
||||
|
@ -55,6 +56,7 @@ CheckForLiveCD(VOID)
|
|||
WCHAR CommandLine[MAX_PATH];
|
||||
HKEY hSetupKey;
|
||||
DWORD dwSetupType;
|
||||
DWORD dwSetupInProgress;
|
||||
DWORD dwType;
|
||||
DWORD dwSize;
|
||||
DWORD dwError;
|
||||
|
@ -107,6 +109,28 @@ CheckForLiveCD(VOID)
|
|||
ScmLiveSetup = TRUE;
|
||||
}
|
||||
|
||||
/* Read the SystemSetupInProgress value */
|
||||
dwSize = sizeof(DWORD);
|
||||
dwError = RegQueryValueExW(hSetupKey,
|
||||
L"SystemSetupInProgress",
|
||||
NULL,
|
||||
&dwType,
|
||||
(LPBYTE)&dwSetupInProgress,
|
||||
&dwSize);
|
||||
if (dwError != ERROR_SUCCESS ||
|
||||
dwType != REG_DWORD ||
|
||||
dwSize != sizeof(DWORD) ||
|
||||
dwSetupType == 0)
|
||||
{
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (dwSetupInProgress == 1)
|
||||
{
|
||||
DPRINT1("ReactOS Setup currently in progress!\n");
|
||||
ScmSetupInProgress = TRUE;
|
||||
}
|
||||
|
||||
done:
|
||||
RegCloseKey(hSetupKey);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue