mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:17:35 +00:00
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.
This commit is contained in:
parent
35e5cbe3b3
commit
10a8b6d411
7 changed files with 16 additions and 8 deletions
|
@ -18,7 +18,7 @@ using namespace TextEditor;
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd thread rpath cpath wpath unix"));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd thread rpath cpath wpath unix prot_exec"));
|
||||
|
||||
auto app = TRY(GUI::Application::try_create(arguments));
|
||||
|
||||
|
@ -35,6 +35,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
TRY(Core::System::unveil("/tmp/portal/launch", "rw"));
|
||||
TRY(Core::System::unveil("/tmp/portal/webcontent", "rw"));
|
||||
TRY(Core::System::unveil("/tmp/portal/filesystemaccess", "rw"));
|
||||
TRY(Core::System::unveil("/usr/lib/libunicodedata.so.serenity", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
StringView preview_mode_view = preview_mode;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue