Utilities/beep: Restrict possible capabilities

We can now just unveil the /dev/beep device node, as well as to restrict
the utility functionality for rpath, wpath & stdio related syscalls only
because we don't actually need anything else.
This commit is contained in:
Liav A authored and Tim Schumacher committed 2023-11-03 15:19:33 +01:00
1 parent 26f96d2a42
commit 55ea2d892c
1 file changed
+3
+3
View File
@@ -10,6 +10,9 @@
ErrorOr<int> serenity_main(Main::Arguments arguments)
{
TRY(Core::System::pledge("stdio rpath wpath"));
TRY(Core::System::unveil("/dev/beep", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));
Optional<size_t> tone;
Optional<size_t> milliseconds_duration;
Core::ArgsParser args_parser;