From e167cafa704fd9d3b8a61fffa18f8a8e5309a256 Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Mon, 21 Feb 2022 22:17:03 +0200 Subject: [PATCH] SystemMonitor: Add missing /boot/Kernel.debug unveil When using the stack tab as root LibSymbolication uses this file to provide Kernel symbols. --- Userland/Applications/SystemMonitor/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Userland/Applications/SystemMonitor/main.cpp b/Userland/Applications/SystemMonitor/main.cpp index 8132325ab6..23c0ce68bd 100644 --- a/Userland/Applications/SystemMonitor/main.cpp +++ b/Userland/Applications/SystemMonitor/main.cpp @@ -124,6 +124,10 @@ ErrorOr serenity_main(Main::Arguments arguments) if (auto result = Core::System::unveil("/usr/local/lib", "r"); result.is_error() && result.error().code() != ENOENT) return result.release_error(); + // This file is only accesible when running as root + if (auto result = Core::System::unveil("/boot/Kernel.debug", "r"); result.is_error() && result.error().code() != EACCES) + return result.release_error(); + TRY(Core::System::unveil("/bin/Profiler", "rx")); TRY(Core::System::unveil("/bin/Inspector", "rx")); TRY(Core::System::unveil(nullptr, nullptr));