summaryrefslogtreecommitdiff
path: root/Applications/Browser
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-04-25 17:21:22 +0200
committerAndreas Kling <kling@serenityos.org>2020-04-25 17:21:59 +0200
commit9093625546724b3b693965119b81b845990a6b42 (patch)
treec4bdbf8ab9a4930ff21135a78a25c2966f731d09 /Applications/Browser
parentbd45b2b8d3a73cba825d8283091d2c14fa00a46f (diff)
downloadserenity-9093625546724b3b693965119b81b845990a6b42.zip
Browser: Unveil /etc/passwd so we can find our home directory if needed
Fixes #1952.
Diffstat (limited to 'Applications/Browser')
-rw-r--r--Applications/Browser/main.cpp5
1 files changed, 5 insertions, 0 deletions
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");