SpiceAgent: Add unveil call on the /proc/all node path

This is needed later in the program when doing unveil on the path of
"/tmp/session/%sid/portal/clipboard", because %sid is translated to the
root session ID which therefore relies on access to the /proc/all node.
This commit is contained in:
Liav A 2022-10-16 19:09:18 +03:00 committed by Linus Groh
commit c58c938659
Notes: sideshowbarker 2024-07-17 05:40:11 +09:00

View file

@ -18,6 +18,7 @@ ErrorOr<int> serenity_main(Main::Arguments)
TRY(Core::System::pledge("unix rpath wpath stdio sendfd recvfd"));
TRY(Core::System::unveil(SPICE_DEVICE, "rw"sv));
TRY(Core::System::unveil("/proc/all", "r"));
TRY(Core::System::unveil("/tmp/session/%sid/portal/clipboard", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));