From 31d4bcf5bfe35a892c6ec04cc9e8d4417b990a48 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 13 May 2021 23:20:26 +0200 Subject: Userland: Tighten a *lot* of pledges! :^) Since applications using Core::EventLoop no longer need to create a socket in /tmp/rpc/, and also don't need to listen for incoming connections on this socket, we can remove a whole bunch of pledges! --- Userland/Demos/Starfield/Starfield.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Userland/Demos/Starfield/Starfield.cpp') diff --git a/Userland/Demos/Starfield/Starfield.cpp b/Userland/Demos/Starfield/Starfield.cpp index 63792196b1..88e250e665 100644 --- a/Userland/Demos/Starfield/Starfield.cpp +++ b/Userland/Demos/Starfield/Starfield.cpp @@ -129,7 +129,7 @@ void Starfield::draw() int main(int argc, char** argv) { - if (pledge("stdio recvfd sendfd rpath wpath cpath accept unix fattr", nullptr) < 0) { + if (pledge("stdio recvfd sendfd rpath unix", nullptr) < 0) { perror("pledge"); return 1; } @@ -151,6 +151,11 @@ int main(int argc, char** argv) auto app = GUI::Application::construct(argc, argv); + if (pledge("stdio recvfd sendfd rpath", nullptr) < 0) { + perror("pledge"); + return 1; + } + auto app_icon = GUI::Icon::default_icon("app-screensaver"); auto window = GUI::Window::construct(); -- cgit v1.2.3