ProtocolServer: Use unveil()

This commit is contained in:
Sergey Bugaev 2020-05-04 19:48:20 +03:00 committed by Andreas Kling
commit 69c23aaedb
Notes: sideshowbarker 2024-07-19 06:58:07 +09:00

View file

@ -43,6 +43,15 @@ int main(int, char**)
perror("pledge"); perror("pledge");
return 1; 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 HttpProtocol;
(void)*new HttpsProtocol; (void)*new HttpsProtocol;
auto server = Core::LocalServer::construct(); auto server = Core::LocalServer::construct();