[SERVICES] Keep a global service bits variable that combines the service bits of...
authorEric Kohl <eric.kohl@reactos.org>
Sun, 22 Jul 2018 13:17:02 +0000 (15:17 +0200)
committerEric Kohl <eric.kohl@reactos.org>
Sun, 22 Jul 2018 23:48:49 +0000 (01:48 +0200)
base/system/services/rpcserver.c

index 2e6e808..fcfb111 100644 (file)
@@ -97,6 +97,7 @@ ScmServiceMapping = {SERVICE_READ,
                      SERVICE_EXECUTE,
                      SERVICE_ALL_ACCESS};
 
+DWORD g_dwServiceBits = 0;
 
 /* FUNCTIONS ***************************************************************/
 
@@ -1884,14 +1885,20 @@ RI_ScSetServiceBitsW(
     if (bSetBitsOn)
     {
         DPRINT("Old service bits: %08lx\n", pService->dwServiceBits);
+        DPRINT("Old global service bits: %08lx\n", g_dwServiceBits);
         pService->dwServiceBits |= dwServiceBits;
+        g_dwServiceBits |= dwServiceBits;
         DPRINT("New service bits: %08lx\n", pService->dwServiceBits);
+        DPRINT("New global service bits: %08lx\n", g_dwServiceBits);
     }
     else
     {
         DPRINT("Old service bits: %08lx\n", pService->dwServiceBits);
+        DPRINT("Old global service bits: %08lx\n", g_dwServiceBits);
         pService->dwServiceBits &= ~dwServiceBits;
+        g_dwServiceBits &= ~dwServiceBits;
         DPRINT("New service bits: %08lx\n", pService->dwServiceBits);
+        DPRINT("New global service bits: %08lx\n", g_dwServiceBits);
     }
 
     return ERROR_SUCCESS;
@@ -2540,7 +2547,6 @@ RCreateServiceW(
                 goto done;
         }
 
-DPRINT1("\n");
         /* Write the security descriptor */
         dwError = ScmWriteSecurityDescriptor(hServiceKey,
                                              lpService->pSecurityDescriptor);