From 1c755d848e3cefcc82a8c01b5deacd0bf50035c1 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 11 Jan 2020 21:29:42 +0100 Subject: [PATCH] SystemServer: Use pledge() --- Servers/SystemServer/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Servers/SystemServer/main.cpp b/Servers/SystemServer/main.cpp index e69405ce45..a5f69a3fe5 100644 --- a/Servers/SystemServer/main.cpp +++ b/Servers/SystemServer/main.cpp @@ -77,6 +77,11 @@ static void mount_all_filesystems() int main(int, char**) { + if (pledge("stdio proc exec unix rpath cpath chown fattr id", nullptr) < 0) { + perror("pledge"); + return 1; + } + mount_all_filesystems(); struct sigaction sa = {