1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:47:46 +00:00

Userland: Link directly against LibUnicodeData where needed

This is partially a revert of commits:
    10a8b6d411
    561b67a1ad

Rather than adding the prot_exec pledge requried to use dlopen(), we can
link directly against LibUnicodeData in applications that we know need
that library.

This might make the dlopen() dance a bit unnecessary. The same purpose
might now be fulfilled with weak symbols. That can be revisted next, but
for now, this at least removes the potential security risk of apps like
the Browser having prot_exec privileges.
This commit is contained in:
Timothy Flynn 2021-12-29 13:10:12 -05:00 committed by Andreas Kling
parent 0c84957eba
commit 565a880ce5
17 changed files with 18 additions and 18 deletions

View file

@ -20,14 +20,14 @@
ErrorOr<int> serenity_main(Main::Arguments arguments)
{
TRY(Core::System::pledge("stdio recvfd sendfd thread rpath unix cpath wpath prot_exec"));
TRY(Core::System::pledge("stdio recvfd sendfd thread rpath unix cpath wpath"));
auto app = TRY(GUI::Application::try_create(arguments));
TRY(Desktop::Launcher::add_allowed_handler_with_only_specific_urls("/bin/Help", { URL::create_with_file_protocol("/usr/share/man/man1/FontEditor.md") }));
TRY(Desktop::Launcher::seal_allowlist());
TRY(Core::System::pledge("stdio recvfd sendfd thread rpath cpath wpath prot_exec"));
TRY(Core::System::pledge("stdio recvfd sendfd thread rpath cpath wpath"));
char const* path = nullptr;
Core::ArgsParser args_parser;