mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 07:37:35 +00:00
Everywhere: Use default execpromises argument for Core::System::pledge
This commit is contained in:
parent
44ffe3e5bb
commit
cf4fa936be
87 changed files with 132 additions and 132 deletions
|
@ -34,12 +34,12 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
ErrorOr<int> mode_server()
|
||||
{
|
||||
Core::EventLoop event_loop;
|
||||
TRY(Core::System::pledge("stdio unix recvfd rpath ", nullptr));
|
||||
TRY(Core::System::pledge("stdio unix recvfd rpath"));
|
||||
|
||||
auto socket = TRY(Core::LocalSocket::take_over_accepted_socket_from_system_server());
|
||||
IPC::new_client_connection<LanguageServers::Cpp::ClientConnection>(move(socket), 1);
|
||||
|
||||
TRY(Core::System::pledge("stdio recvfd rpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd rpath"));
|
||||
TRY(Core::System::unveil("/usr/include", "r"));
|
||||
|
||||
// unveil will be sealed later, when we know the project's root path.
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
ErrorOr<int> serenity_main(Main::Arguments)
|
||||
{
|
||||
Core::EventLoop event_loop;
|
||||
TRY(Core::System::pledge("stdio unix rpath recvfd", nullptr));
|
||||
TRY(Core::System::pledge("stdio unix rpath recvfd"));
|
||||
|
||||
auto socket = TRY(Core::LocalSocket::take_over_accepted_socket_from_system_server());
|
||||
IPC::new_client_connection<LanguageServers::Shell::ClientConnection>(move(socket), 1);
|
||||
TRY(Core::System::pledge("stdio rpath recvfd", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath recvfd"));
|
||||
TRY(Core::System::unveil("/etc/passwd", "r"));
|
||||
|
||||
return event_loop.exec();
|
||||
|
|
|
@ -35,7 +35,7 @@ static void update_path_environment_variable();
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd tty rpath cpath wpath proc exec unix fattr thread ptrace", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd tty rpath cpath wpath proc exec unix fattr thread ptrace"));
|
||||
|
||||
auto app = GUI::Application::construct(arguments.argc, arguments.argv);
|
||||
Config::pledge_domains({ "HackStudio", "Terminal" });
|
||||
|
|
|
@ -36,7 +36,7 @@ using namespace Inspector;
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath unix", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath unix"));
|
||||
TRY(Core::System::unveil("/res", "r"));
|
||||
TRY(Core::System::unveil("/bin", "r"));
|
||||
TRY(Core::System::unveil("/tmp", "rwc"));
|
||||
|
|
|
@ -62,15 +62,15 @@ void UnregisteredWidget::paint_event(GUI::PaintEvent& event)
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio thread recvfd sendfd cpath rpath wpath unix", nullptr));
|
||||
TRY(Core::System::pledge("stdio thread recvfd sendfd cpath rpath wpath unix"));
|
||||
auto app = TRY(GUI::Application::try_create(arguments));
|
||||
|
||||
TRY(Core::System::pledge("stdio thread recvfd sendfd rpath cpath wpath unix", nullptr));
|
||||
TRY(Core::System::pledge("stdio thread recvfd sendfd rpath cpath wpath unix"));
|
||||
|
||||
TRY(Desktop::Launcher::add_allowed_handler_with_only_specific_urls("/bin/Help", { URL::create_with_file_protocol("/usr/share/man/man1/Playground.md") }));
|
||||
TRY(Desktop::Launcher::seal_allowlist());
|
||||
|
||||
TRY(Core::System::pledge("stdio thread recvfd sendfd rpath cpath wpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio thread recvfd sendfd rpath cpath wpath"));
|
||||
|
||||
const char* path = nullptr;
|
||||
Core::ArgsParser args_parser;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue