NetworkSettings: Use helper script to write config

This change allows us to not run the app with elevated privileges.

It uses the Escalator to call a helper and passes the settings as
JsonObject to it.
This commit is contained in:
Fabian Dellwing 2023-04-27 21:07:07 +02:00 committed by Andrew Kaster
commit 24b1bdca27
Notes: sideshowbarker 2024-07-16 20:39:14 +09:00
3 changed files with 68 additions and 22 deletions

View file

@ -19,8 +19,8 @@ ErrorOr<int> serenity_main(Main::Arguments args)
{
TRY(Core::System::pledge("stdio rpath wpath cpath recvfd sendfd unix proc exec"));
TRY(Core::System::unveil("/bin/NetworkServer", "x"));
TRY(Core::System::unveil("/etc/Network.ini", "rwc"));
TRY(Core::System::unveil("/bin/Escalator", "x"));
TRY(Core::System::unveil("/etc/Network.ini", "r"));
TRY(Core::System::unveil("/sys/kernel/net/adapters", "r"));
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/tmp/session/%sid/portal/clipboard", "rw"));