From b2ec579e9861e33bdd9573abf899deb326f26fc1 Mon Sep 17 00:00:00 2001 From: Daniel Bertalan Date: Fri, 13 Aug 2021 21:00:34 +0200 Subject: [PATCH] SystemMonitor: Don't fail if we don't have ports installed In #9373, /usr/local/bin was added to the unveiled directories to make symbolization work on ports. This directory only exists if at least one port is installed, so unveil would fail with ENOENT if we had none. --- Userland/Applications/SystemMonitor/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Userland/Applications/SystemMonitor/main.cpp b/Userland/Applications/SystemMonitor/main.cpp index de94c32f5d..72c35b8418 100644 --- a/Userland/Applications/SystemMonitor/main.cpp +++ b/Userland/Applications/SystemMonitor/main.cpp @@ -139,7 +139,8 @@ int main(int argc, char** argv) return 1; } - if (unveil("/usr/local/bin", "r") < 0) { + // This directory only exists if ports are installed + if (unveil("/usr/local/bin", "r") < 0 && errno != ENOENT) { perror("unveil"); return 1; }