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
Notes: sideshowbarker 2024-07-17 19:43:32 +09:00

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>());