[SYSSETUP] Fix an issue that may be caused by a missing security settings file
authorEric Kohl <eric.kohl@reactos.org>
Tue, 29 May 2018 10:49:24 +0000 (12:49 +0200)
committerEric Kohl <eric.kohl@reactos.org>
Tue, 29 May 2018 10:49:24 +0000 (12:49 +0200)
Found by Serge Gautherie

dll/win32/syssetup/security.c

index d5538a5..4ef67fb 100644 (file)
@@ -589,7 +589,7 @@ ApplyRegistryValues(
 VOID
 InstallSecurity(VOID)
 {
-    HINF hSecurityInf = INVALID_HANDLE_VALUE;
+    HINF hSecurityInf;
     PWSTR pszSecurityInf;
 
 //    if (IsServer())
@@ -603,16 +603,13 @@ InstallSecurity(VOID)
                                      NULL,
                                      INF_STYLE_WIN4,
                                      NULL);
-    if (hSecurityInf == INVALID_HANDLE_VALUE)
+    if (hSecurityInf != INVALID_HANDLE_VALUE)
     {
-        DPRINT1("SetupOpenInfFileW failed\n");
-        return;
-    }
+        InstallPrivileges(hSecurityInf);
+        ApplyRegistryValues(hSecurityInf);
 
-    InstallPrivileges(hSecurityInf);
-    ApplyRegistryValues(hSecurityInf);
-
-    SetupCloseInfFile(hSecurityInf);
+        SetupCloseInfFile(hSecurityInf);
+    }
 
     /* Hack */
     SetPrimaryDomain(L"WORKGROUP", NULL);