Pārlūkot izejas kodu

HackStudio: Remove unnecessary unveil in ShellLanguageServer

Remove unveil on / with only browse permissions. Unveil will be sealed
later when the root path of project is known.
NonStdModel 4 gadi atpakaļ
vecāks
revīzija
c93f73c617

+ 3 - 1
Userland/DevTools/HackStudio/LanguageServers/Cpp/main.cpp

@@ -47,8 +47,10 @@ int mode_server()
         return 1;
     }
 
-    if (unveil("/usr/include", "r") < 0)
+    if (unveil("/usr/include", "r") < 0) {
         perror("unveil");
+        return 1;
+    }
 
     // unveil will be sealed later, when we know the project's root path.
     return event_loop.exec();

+ 1 - 4
Userland/DevTools/HackStudio/LanguageServers/Shell/main.cpp

@@ -31,9 +31,6 @@ int main(int, char**)
         perror("unveil");
         return 1;
     }
-    if (unveil("/", "b") < 0) {
-        perror("unveil");
-        return 1;
-    }
+
     return event_loop.exec();
 }