From e1cc2acded143a34d9f5b870e6a53010880762ba Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 11 Jan 2021 19:03:09 +0100 Subject: [PATCH] CrashDaemon: Use pledge --- Services/CrashDaemon/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Services/CrashDaemon/main.cpp b/Services/CrashDaemon/main.cpp index b16d412074..2453f73699 100644 --- a/Services/CrashDaemon/main.cpp +++ b/Services/CrashDaemon/main.cpp @@ -74,6 +74,11 @@ static void launch_crash_reporter(const String& coredump_path) int main() { + if (pledge("stdio rpath proc exec", nullptr) < 0) { + perror("pledge"); + return 1; + } + Core::DirectoryWatcher watcher { "/tmp/coredump" }; while (true) { auto event = watcher.wait_for_event();