mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:34:57 +00:00
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:
parent
26f96d2a42
commit
55ea2d892c
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue