mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
WindowServer: Unveil only subdirectories in /dev directory
Now that each HID device node is located in /dev/input/, and Display Connector device nodes are in /dev/gpu/, we can simply just unveil those directories instead of the entire /dev directory.
This commit is contained in:
parent
89835558b4
commit
5d0edc7a42
1 changed files with 3 additions and 5 deletions
|
@ -27,7 +27,9 @@ ErrorOr<int> serenity_main(Main::Arguments)
|
|||
TRY(Core::System::unveil("/tmp", "cw"));
|
||||
TRY(Core::System::unveil("/etc/WindowServer.ini", "rwc"));
|
||||
TRY(Core::System::unveil("/etc/Keyboard.ini", "r"));
|
||||
TRY(Core::System::unveil("/dev", "rw"));
|
||||
TRY(Core::System::unveil("/dev/tty", "rw"));
|
||||
TRY(Core::System::unveil("/dev/gpu/", "rw"));
|
||||
TRY(Core::System::unveil("/dev/input/", "rw"));
|
||||
TRY(Core::System::unveil("/bin/keymap", "x"));
|
||||
TRY(Core::System::unveil("/proc/keymap", "r"));
|
||||
|
||||
|
@ -136,10 +138,6 @@ ErrorOr<int> serenity_main(Main::Arguments)
|
|||
|
||||
TRY(Core::System::unveil("/tmp", ""));
|
||||
|
||||
// NOTE: Because we dynamically need to be able to open new /dev/gpu/connector*
|
||||
// devices we can't really unveil all of /dev unless we have some
|
||||
// other mechanism that can hand us file descriptors for these.
|
||||
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
dbgln("Entering WindowServer main loop");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue