diff options
author | Andreas Kling <kling@serenityos.org> | 2020-04-25 17:21:22 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-04-25 17:21:59 +0200 |
commit | 9093625546724b3b693965119b81b845990a6b42 (patch) | |
tree | c4bdbf8ab9a4930ff21135a78a25c2966f731d09 /Applications/Browser | |
parent | bd45b2b8d3a73cba825d8283091d2c14fa00a46f (diff) | |
download | serenity-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.cpp | 5 |
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"); |