mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
Userland: Unveil /proc/all in applications which require it
These were missed in 7af5eef
. It is needed for any application using
e.g. FileSystemAccessServer.
This commit is contained in:
parent
25e0ab3ee4
commit
7cab86ad28
Notes:
sideshowbarker
2024-07-17 06:23:37 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/7cab86ad28 Pull-request: https://github.com/SerenityOS/serenity/pull/15456
9 changed files with 9 additions and 0 deletions
|
@ -360,6 +360,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
TRY(Core::System::pledge("stdio thread recvfd sendfd rpath unix prot_exec"));
|
||||
|
||||
TRY(Core::System::unveil("/proc/all", "r"));
|
||||
TRY(Core::System::unveil("/tmp/session/%sid/portal/filesystemaccess", "rw"));
|
||||
TRY(Core::System::unveil("/home/anon/Documents/3D Models", "r"));
|
||||
TRY(Core::System::unveil("/res", "r"));
|
||||
|
|
|
@ -43,6 +43,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
return GUI::Window::CloseRequestDecision::StayOpen;
|
||||
};
|
||||
|
||||
TRY(Core::System::unveil("/proc/all", "r"));
|
||||
TRY(Core::System::unveil("/tmp/session/%sid/portal/filesystemaccess", "rw"));
|
||||
TRY(Core::System::unveil("/res", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
|
|
@ -40,6 +40,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
TRY(Core::System::pledge("stdio cpath rpath recvfd sendfd unix"));
|
||||
auto app = TRY(GUI::Application::try_create(arguments));
|
||||
|
||||
TRY(Core::System::unveil("/proc/all", "r"));
|
||||
TRY(Core::System::unveil("/tmp/session/%sid/portal/filesystemaccess", "rw"));
|
||||
TRY(Core::System::unveil("/res", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
|
|
@ -34,6 +34,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath unix"));
|
||||
|
||||
TRY(Core::System::unveil("/proc/all", "r"));
|
||||
TRY(Core::System::unveil("/tmp/session/%sid/portal/filesystemaccess", "rw"));
|
||||
TRY(Core::System::unveil("/res", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
|
|
@ -44,6 +44,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
}
|
||||
}
|
||||
|
||||
TRY(Core::System::unveil("/proc/all", "r"));
|
||||
TRY(Core::System::unveil("/tmp/session/%sid/portal/webcontent", "rw"));
|
||||
// For writing temporary files when exporting.
|
||||
TRY(Core::System::unveil("/tmp", "crw"));
|
||||
|
|
|
@ -39,6 +39,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
path = Core::File::absolute_path(file_to_edit);
|
||||
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd thread rpath unix"));
|
||||
TRY(Core::System::unveil("/proc/all", "r"));
|
||||
TRY(Core::System::unveil("/tmp/session/%sid/portal/filesystemaccess", "rw"));
|
||||
TRY(Core::System::unveil("/res", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
|
|
@ -40,6 +40,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto app = TRY(GUI::Application::try_create(arguments));
|
||||
|
||||
TRY(Core::System::unveil("/proc/all", "r"));
|
||||
TRY(Core::System::unveil("/tmp/session/%sid/portal/launch", "rw"));
|
||||
TRY(Core::System::unveil("/res", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
|
|
@ -17,6 +17,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
TRY(Core::System::pledge("stdio recvfd sendfd rpath unix thread"));
|
||||
auto app = TRY(GUI::Application::try_create(arguments, Core::EventLoop::MakeInspectable::Yes));
|
||||
|
||||
TRY(Core::System::unveil("/proc/all", "r"));
|
||||
TRY(Core::System::unveil("/tmp/session/%sid/portal/filesystemaccess", "rw"));
|
||||
TRY(Core::System::unveil("/res", "r"));
|
||||
TRY(Core::System::unveil("/etc/FileIconProvider.ini", "r"));
|
||||
|
|
|
@ -34,6 +34,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
args_parser.add_option(show_sample_progress, "Show playback progress in samples", "sample-progress", 's');
|
||||
args_parser.parse(arguments);
|
||||
|
||||
TRY(Core::System::unveil("/proc/all", "r"));
|
||||
TRY(Core::System::unveil("/tmp/session/%sid/portal/audio", "rw"));
|
||||
TRY(Core::System::unveil(Core::File::absolute_path(path), "r"sv));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
|
Loading…
Reference in a new issue