PDFViewer: Add a basic set of pledges

This commit is contained in:
Andreas Kling 2021-12-25 10:58:30 +01:00
parent 50e090071c
commit e815bf5d1f
Notes: sideshowbarker 2024-07-17 22:11:49 +09:00

View File

@ -24,6 +24,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
window->set_title("PDF Viewer");
window->resize(640, 400);
TRY(Core::System::pledge("stdio recvfd sendfd rpath unix"));
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/tmp/portal/filesystemaccess", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));