Utilities: Pledge inet in arp command

Previously the arp command would crash when trying to set/delete from
the table.
This commit is contained in:
brapru 2022-04-05 06:14:54 -04:00 committed by Andreas Kling
commit 26b8155530
Notes: sideshowbarker 2024-07-17 14:25:18 +09:00

View file

@ -25,7 +25,7 @@
ErrorOr<int> serenity_main(Main::Arguments arguments) ErrorOr<int> serenity_main(Main::Arguments arguments)
{ {
TRY(Core::System::pledge("stdio rpath tty")); TRY(Core::System::pledge("stdio rpath tty inet"));
TRY(Core::System::unveil("/proc/net/arp", "r")); TRY(Core::System::unveil("/proc/net/arp", "r"));
TRY(Core::System::unveil(nullptr, nullptr)); TRY(Core::System::unveil(nullptr, nullptr));