From d2e49719c4d60ea8fe5c372a838845554e39972a Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 11 Jan 2020 21:25:03 +0100 Subject: [PATCH] WindowServer: Use pledge() --- Servers/WindowServer/main.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Servers/WindowServer/main.cpp b/Servers/WindowServer/main.cpp index 5c786d655d..d6aa05a635 100644 --- a/Servers/WindowServer/main.cpp +++ b/Servers/WindowServer/main.cpp @@ -10,6 +10,11 @@ int main(int, char**) { + if (pledge("stdio shared_buffer rpath wpath cpath unix proc fattr", nullptr) < 0) { + perror("pledge"); + return 1; + } + struct sigaction act; memset(&act, 0, sizeof(act)); act.sa_flags = SA_NOCLDWAIT; @@ -30,6 +35,11 @@ int main(int, char**) WSEventLoop loop; + if (pledge("stdio shared_buffer rpath wpath cpath unix proc", nullptr) < 0) { + perror("pledge"); + return 1; + } + WSScreen screen(wm_config->read_num_entry("Screen", "Width", 1024), wm_config->read_num_entry("Screen", "Height", 768)); WSCompositor::the();