diff --git a/Userland/Services/NetworkServer/main.cpp b/Userland/Services/NetworkServer/main.cpp index a398b9794b..4bbf3fe232 100644 --- a/Userland/Services/NetworkServer/main.cpp +++ b/Userland/Services/NetworkServer/main.cpp @@ -22,6 +22,7 @@ ErrorOr serenity_main(Main::Arguments) TRY(Core::System::unveil("/bin/DHCPClient", "x")); TRY(Core::System::unveil("/etc/Network.ini", "r")); TRY(Core::System::unveil("/bin/ifconfig", "x")); + TRY(Core::System::unveil("/bin/killall", "x")); TRY(Core::System::unveil("/bin/route", "x")); TRY(Core::System::unveil(nullptr, nullptr)); @@ -88,6 +89,7 @@ ErrorOr serenity_main(Main::Arguments) for (auto& iface : interfaces_with_dhcp_enabled) args.append(const_cast(iface.characters())); args.append(nullptr); + MUST(Core::command("killall", { "DHCPClient" }, {})); auto dhcp_client_pid = TRY(Core::System::posix_spawnp("DHCPClient", nullptr, nullptr, args.data(), environ)); TRY(Core::System::disown(dhcp_client_pid)); }