[SERVICES]
[reactos.git] / reactos / base / system / services / rpcserver.c
index 58a3cb5..66bc17f 100644 (file)
@@ -2255,7 +2255,9 @@ DWORD RCreateServiceW(
     /* Assign the default security descriptor */
     if (dwServiceType & SERVICE_WIN32)
     {
-        lpService->pSecurityDescriptor = pDefaultServiceSD;
+        dwError = ScmCreateDefaultServiceSD(&lpService->pSecurityDescriptor);
+        if (dwError != ERROR_SUCCESS)
+            goto done;
     }
 
     /* Write service data to the registry */