From edf509c19e8b75e4773930c9a8d0f4dd2912197e Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 21 Jan 2020 18:45:18 +0100 Subject: [PATCH] SystemMonitor: Use unveil() --- Applications/SystemMonitor/main.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Applications/SystemMonitor/main.cpp b/Applications/SystemMonitor/main.cpp index f715ce8b4b..b1679acad4 100644 --- a/Applications/SystemMonitor/main.cpp +++ b/Applications/SystemMonitor/main.cpp @@ -88,6 +88,23 @@ int main(int argc, char** argv) return 1; } + if (unveil("/etc/passwd", "r") < 0) { + perror("unveil"); + return 1; + } + + if (unveil("/res", "r") < 0) { + perror("unveil"); + return 1; + } + + if (unveil("/proc", "r") < 0) { + perror("unveil"); + return 1; + } + + unveil(nullptr, nullptr); + auto keeper = GWidget::construct(); keeper->set_layout(make(Orientation::Vertical)); keeper->set_fill_with_background_color(true);