From e815bf5d1f85fa91679bbd54b7d018a16359e6ca Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 25 Dec 2021 10:58:30 +0100 Subject: [PATCH] PDFViewer: Add a basic set of pledges --- Userland/Applications/PDFViewer/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Userland/Applications/PDFViewer/main.cpp b/Userland/Applications/PDFViewer/main.cpp index 89854efc26..44bdafbc3a 100644 --- a/Userland/Applications/PDFViewer/main.cpp +++ b/Userland/Applications/PDFViewer/main.cpp @@ -24,6 +24,8 @@ ErrorOr 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));