diff options
author | Timothy Flynn <trflynn89@pm.me> | 2021-12-16 08:13:00 -0500 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2021-12-21 13:09:49 -0800 |
commit | 10a8b6d4116c6a627a6c189154af032f69b29c21 (patch) | |
tree | cbc7b2ef4f83550c2155111176a2b62d08e1ab96 /Userland/Applications/Browser/main.cpp | |
parent | 35e5cbe3b3248877c49d046a7f0333f365fb7cd8 (diff) | |
download | serenity-10a8b6d4116c6a627a6c189154af032f69b29c21.zip |
Userland: Add unveil/pledge requisites for dynamic Unicode data loading
Loading libunicodedata.so will require dlopen(), which in turn requires
mmap(). The 'prot_exec' pledge is needed for this.
Further, the .so itself must be unveiled for reading. The "real" path is
unveiled (libunicodedata.so.serenity) as the symlink (libunicodedata.so)
itself cannot be unveiled.
Diffstat (limited to 'Userland/Applications/Browser/main.cpp')
-rw-r--r-- | Userland/Applications/Browser/main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Applications/Browser/main.cpp b/Userland/Applications/Browser/main.cpp index ccbd85693b..000dc42679 100644 --- a/Userland/Applications/Browser/main.cpp +++ b/Userland/Applications/Browser/main.cpp @@ -39,7 +39,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) return 1; } - TRY(Core::System::pledge("stdio recvfd sendfd unix cpath rpath wpath")); + TRY(Core::System::pledge("stdio recvfd sendfd unix cpath rpath wpath prot_exec")); const char* specified_url = nullptr; @@ -63,6 +63,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) TRY(Core::System::unveil("/tmp/portal/image", "rw")); TRY(Core::System::unveil("/tmp/portal/webcontent", "rw")); TRY(Core::System::unveil("/tmp/portal/request", "rw")); + TRY(Core::System::unveil("/usr/lib/libunicodedata.so.serenity", "r")); TRY(Core::System::unveil(nullptr, nullptr)); auto app_icon = GUI::Icon::default_icon("app-browser"); |