mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-06 17:48:37 +00:00
Utilities/arp: Don't unveil /tmp/portal/lookup for numerical output
It's not needed in such case, and in the near-future when we would want to use this utility in an initramfs environment where there's no service such as LookupServer being running, it's still useful to have the option to invoke this utility with the mentioned limited output functionality.
This commit is contained in:
parent
0ce1c52577
commit
4b1e501bdf
Notes:
sideshowbarker
2024-07-17 00:59:43 +09:00
Author: https://github.com/supercomputer7
Commit: 4b1e501bdf
Pull-request: https://github.com/SerenityOS/serenity/pull/17458
1 changed files with 6 additions and 3 deletions
|
@ -28,9 +28,6 @@
|
|||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio rpath tty inet unix"));
|
||||
TRY(Core::System::unveil("/sys/kernel/net/arp", "r"));
|
||||
TRY(Core::System::unveil("/tmp/portal/lookup", "rw"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
static bool flag_set;
|
||||
static bool flag_delete;
|
||||
|
@ -47,6 +44,12 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
args_parser.add_positional_argument(value_hw_address, "Hardware address", "hwaddress", Core::ArgsParser::Required::No);
|
||||
args_parser.parse(arguments);
|
||||
|
||||
TRY(Core::System::unveil("/sys/kernel/net/arp", "r"));
|
||||
if (!flag_numeric)
|
||||
TRY(Core::System::unveil("/tmp/portal/lookup", "rw"));
|
||||
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
enum class Alignment {
|
||||
Left,
|
||||
Right
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue