1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-08-02 20:37:35 +00:00

LibCore+LaunchServer: Move portal directory to /tmp/user/%uid

The `/tmp/user` directory is owned by root, this solution prevents
malicious users to interfere with other users' portals.

This commit also moves `launch`'s portal in the user directory.
This commit is contained in:
Lucas CHOLLET 2022-08-07 18:10:26 +02:00 committed by Linus Groh
parent f0012c2162
commit c5b7c9f479
17 changed files with 25 additions and 20 deletions

View file

@ -56,7 +56,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
{
auto app = TRY(GUI::Application::try_create(arguments));
TRY(Core::System::pledge("stdio recvfd sendfd cpath rpath exec proc id"));
TRY(Core::System::pledge("stdio recvfd sendfd cpath chown rpath exec proc id"));
TRY(Core::System::unveil("/home", "r"));
TRY(Core::System::unveil("/tmp", "c"));
TRY(Core::System::unveil("/etc/passwd", "r"));