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

LaunchServer+SystemServer: Move the portal to a user-specific directory

Various changes are needed to support this:
 - The directory is created by Core::Account on login (and located in
   /tmp).
 - Service's sockets are now deleted on exit (to allow re-creation)
 - SystemServer needs to handle SIGTERM to correctly destroy services.
This commit is contained in:
Lucas CHOLLET 2022-07-17 15:41:01 +02:00 committed by Linus Groh
parent cc0d53d6a6
commit 70846d701c
21 changed files with 47 additions and 26 deletions

View file

@ -45,7 +45,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::pledge("stdio rpath recvfd sendfd"));
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/tmp/portal/launch", "rw"));
TRY(Core::System::unveil("/tmp/100/portal/launch", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));
size_t board_size = Config::read_i32("2048"sv, ""sv, "board_size"sv, 4);

View file

@ -41,7 +41,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/bin/ChessEngine", "x"));
TRY(Core::System::unveil("/etc/passwd", "r"));
TRY(Core::System::unveil("/tmp/portal/launch", "rw"));
TRY(Core::System::unveil("/tmp/100/portal/launch", "rw"));
TRY(Core::System::unveil(Core::StandardPaths::home_directory(), "wcbr"sv));
TRY(Core::System::unveil(nullptr, nullptr));

View file

@ -31,7 +31,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::pledge("stdio rpath recvfd sendfd"));
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/tmp/portal/launch", "rw"));
TRY(Core::System::unveil("/tmp/100/portal/launch", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));
u32 high_score = Config::read_i32("FlappyBug"sv, "Game"sv, "HighScore"sv, 0);

View file

@ -37,7 +37,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::pledge("stdio rpath recvfd sendfd"));
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/tmp/portal/launch", "rw"));
TRY(Core::System::unveil("/tmp/100/portal/launch", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));
auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-gameoflife"sv));

View file

@ -41,7 +41,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::pledge("stdio recvfd sendfd rpath"));
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/tmp/portal/launch", "rw"));
TRY(Core::System::unveil("/tmp/100/portal/launch", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));
auto window = TRY(GUI::Window::try_create());

View file

@ -33,7 +33,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::pledge("stdio rpath recvfd sendfd"));
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/tmp/portal/launch", "rw"));
TRY(Core::System::unveil("/tmp/100/portal/launch", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));
auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-masterword"sv));

View file

@ -38,7 +38,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::pledge("stdio rpath recvfd sendfd"));
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/tmp/portal/launch", "rw"));
TRY(Core::System::unveil("/tmp/100/portal/launch", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));
auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-minesweeper"sv));

View file

@ -34,7 +34,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::pledge("stdio rpath recvfd sendfd"));
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/tmp/portal/launch", "rw"));
TRY(Core::System::unveil("/tmp/100/portal/launch", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));
auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-snake"sv));