mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 20:25:39 +00:00
[SERVICES] Keep a global service bits variable that combines the service bits of all running services
This commit is contained in:
parent
2158f31b71
commit
66981e1b07
1 changed files with 7 additions and 1 deletions
|
@ -97,6 +97,7 @@ ScmServiceMapping = {SERVICE_READ,
|
||||||
SERVICE_EXECUTE,
|
SERVICE_EXECUTE,
|
||||||
SERVICE_ALL_ACCESS};
|
SERVICE_ALL_ACCESS};
|
||||||
|
|
||||||
|
DWORD g_dwServiceBits = 0;
|
||||||
|
|
||||||
/* FUNCTIONS ***************************************************************/
|
/* FUNCTIONS ***************************************************************/
|
||||||
|
|
||||||
|
@ -1884,14 +1885,20 @@ RI_ScSetServiceBitsW(
|
||||||
if (bSetBitsOn)
|
if (bSetBitsOn)
|
||||||
{
|
{
|
||||||
DPRINT("Old service bits: %08lx\n", pService->dwServiceBits);
|
DPRINT("Old service bits: %08lx\n", pService->dwServiceBits);
|
||||||
|
DPRINT("Old global service bits: %08lx\n", g_dwServiceBits);
|
||||||
pService->dwServiceBits |= dwServiceBits;
|
pService->dwServiceBits |= dwServiceBits;
|
||||||
|
g_dwServiceBits |= dwServiceBits;
|
||||||
DPRINT("New service bits: %08lx\n", pService->dwServiceBits);
|
DPRINT("New service bits: %08lx\n", pService->dwServiceBits);
|
||||||
|
DPRINT("New global service bits: %08lx\n", g_dwServiceBits);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT("Old service bits: %08lx\n", pService->dwServiceBits);
|
DPRINT("Old service bits: %08lx\n", pService->dwServiceBits);
|
||||||
|
DPRINT("Old global service bits: %08lx\n", g_dwServiceBits);
|
||||||
pService->dwServiceBits &= ~dwServiceBits;
|
pService->dwServiceBits &= ~dwServiceBits;
|
||||||
|
g_dwServiceBits &= ~dwServiceBits;
|
||||||
DPRINT("New service bits: %08lx\n", pService->dwServiceBits);
|
DPRINT("New service bits: %08lx\n", pService->dwServiceBits);
|
||||||
|
DPRINT("New global service bits: %08lx\n", g_dwServiceBits);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
|
@ -2540,7 +2547,6 @@ RCreateServiceW(
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT1("\n");
|
|
||||||
/* Write the security descriptor */
|
/* Write the security descriptor */
|
||||||
dwError = ScmWriteSecurityDescriptor(hServiceKey,
|
dwError = ScmWriteSecurityDescriptor(hServiceKey,
|
||||||
lpService->pSecurityDescriptor);
|
lpService->pSecurityDescriptor);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue