1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:34:59 +00:00

SystemServer+LoginServer+Userland: Switch to sid-based sockets

This commit does three things atomically:
- switch over Core::Account+SystemServer+LoginServer to sid based socket
  names.
- change socket names with %uid to %sid.
- add/update necessary pledges and unveils.

Userland: Switch over servers to sid based sockets

Userland: Properly pledge and unveil for sid based sockets
This commit is contained in:
Peter Elliott 2022-09-06 00:04:06 -06:00 committed by Andreas Kling
parent 1df4cc1926
commit 7af5eef0dd
50 changed files with 134 additions and 130 deletions

View file

@ -22,7 +22,7 @@ constexpr size_t LOAD_CHUNK_SIZE = 128 * KiB;
ErrorOr<int> serenity_main(Main::Arguments arguments)
{
TRY(Core::System::pledge("stdio rpath sendfd unix thread"));
TRY(Core::System::pledge("stdio rpath sendfd unix thread proc"));
StringView path {};
bool should_loop = false;
@ -34,8 +34,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
args_parser.add_option(show_sample_progress, "Show playback progress in samples", "sample-progress", 's');
args_parser.parse(arguments);
TRY(Core::System::unveil("/tmp/session/%sid/portal/audio", "rw"));
TRY(Core::System::unveil(Core::File::absolute_path(path), "r"sv));
TRY(Core::System::unveil("/tmp/user/%uid/portal/audio", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));
Core::EventLoop loop;