1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:27:35 +00:00

WebSocket: Pledge rpath and unveil /etc/timezone

This is required for timezone stuff, otherwise we'd just crash.
This commit is contained in:
Ali Mohammad Pur 2022-02-04 14:10:58 +03:30 committed by Andreas Kling
parent 6f5ab30253
commit 63b4c35ec7

View file

@ -21,8 +21,8 @@ ErrorOr<int> serenity_main(Main::Arguments)
Core::EventLoop event_loop;
// FIXME: Establish a connection to LookupServer and then drop "unix"?
TRY(Core::System::pledge("stdio inet unix sendfd recvfd"));
TRY(Core::System::unveil("/tmp/portal/lookup", "rw"));
TRY(Core::System::unveil("/etc/timezone", "r"));
TRY(Core::System::unveil(nullptr, nullptr));
auto client = TRY(IPC::take_over_accepted_client_from_system_server<WebSocket::ClientConnection>());