summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@serenityos.org>2020-05-04 19:48:20 +0300
committerAndreas Kling <kling@serenityos.org>2020-05-05 11:07:06 +0200
commit69c23aaedb4e999cd64d1237d23b31ad741f65fa (patch)
tree81ad229897085ad53429dda65f551f11c1b3200e
parent983e541584e4496448559cce2fbcc5edbd51337e (diff)
downloadserenity-69c23aaedb4e999cd64d1237d23b31ad741f65fa.zip
ProtocolServer: Use unveil()
-rw-r--r--Servers/ProtocolServer/main.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/Servers/ProtocolServer/main.cpp b/Servers/ProtocolServer/main.cpp
index 100fe42cd2..9a3da67b78 100644
--- a/Servers/ProtocolServer/main.cpp
+++ b/Servers/ProtocolServer/main.cpp
@@ -43,6 +43,15 @@ int main(int, char**)
perror("pledge");
return 1;
}
+ if (unveil("/tmp/portal/lookup", "rw") < 0) {
+ perror("unveil");
+ return 1;
+ }
+ if (unveil(nullptr, nullptr) < 0) {
+ perror("unveil");
+ return 1;
+ }
+
(void)*new HttpProtocol;
(void)*new HttpsProtocol;
auto server = Core::LocalServer::construct();