From 9093625546724b3b693965119b81b845990a6b42 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 25 Apr 2020 17:21:22 +0200 Subject: [PATCH] Browser: Unveil /etc/passwd so we can find our home directory if needed Fixes #1952. --- Applications/Browser/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Applications/Browser/main.cpp b/Applications/Browser/main.cpp index af0d5f03e2..648f7f4ae3 100644 --- a/Applications/Browser/main.cpp +++ b/Applications/Browser/main.cpp @@ -74,6 +74,11 @@ int main(int argc, char** argv) return 1; } + if (unveil("/etc/passwd", "r") < 0) { + perror("unveil"); + return 1; + } + unveil(nullptr, nullptr); auto m_config = Core::ConfigFile::get_for_app("Browser");