1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 01:51:03 +09:00

Applications: Use default execpromises parameter to pledge(..)

This commit is contained in:
Brian Gianforcaro 2022-04-03 16:13:41 -07:00 committed by Brian Gianforcaro
parent 7c0495cbac
commit 9cfd520bb8
Notes: sideshowbarker 2024-07-17 14:28:46 +09:00
6 changed files with 9 additions and 9 deletions

View file

@ -193,7 +193,7 @@ static constexpr size_t MAX_SEARCH_RESULTS = 6;
ErrorOr<int> serenity_main(Main::Arguments arguments) ErrorOr<int> serenity_main(Main::Arguments arguments)
{ {
TRY(Core::System::pledge("stdio recvfd sendfd rpath cpath unix proc exec thread", nullptr)); TRY(Core::System::pledge("stdio recvfd sendfd rpath cpath unix proc exec thread"));
Core::LockFile lockfile("/tmp/lock/assistant.lock"); Core::LockFile lockfile("/tmp/lock/assistant.lock");

View file

@ -22,11 +22,11 @@
ErrorOr<int> serenity_main(Main::Arguments arguments) 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"));
auto app = TRY(GUI::Application::try_create(arguments)); auto app = TRY(GUI::Application::try_create(arguments));
TRY(Core::System::pledge("stdio recvfd sendfd rpath", nullptr)); TRY(Core::System::pledge("stdio recvfd sendfd rpath"));
TRY(Core::System::unveil("/etc/timezone", "r")); TRY(Core::System::unveil("/etc/timezone", "r"));
TRY(Core::System::unveil("/res", "r")); TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil(nullptr, nullptr)); TRY(Core::System::unveil(nullptr, nullptr));

View file

@ -212,7 +212,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
{ {
editor = Line::Editor::construct(); editor = Line::Editor::construct();
TRY(Core::System::pledge("stdio proc ptrace exec rpath tty sigaction cpath unix", nullptr)); TRY(Core::System::pledge("stdio proc ptrace exec rpath tty sigaction cpath unix"));
char const* command = nullptr; char const* command = nullptr;
Core::ArgsParser args_parser; Core::ArgsParser args_parser;

View file

@ -17,10 +17,10 @@
ErrorOr<int> serenity_main(Main::Arguments arguments) ErrorOr<int> serenity_main(Main::Arguments arguments)
{ {
TRY(Core::System::pledge("stdio cpath rpath recvfd sendfd unix", nullptr)); TRY(Core::System::pledge("stdio cpath rpath recvfd sendfd unix"));
auto app = GUI::Application::construct(arguments); auto app = GUI::Application::construct(arguments);
TRY(Core::System::pledge("stdio cpath rpath recvfd sendfd", nullptr)); TRY(Core::System::pledge("stdio cpath rpath recvfd sendfd"));
TRY(Core::System::unveil("/res", "r")); TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil(nullptr, nullptr)); TRY(Core::System::unveil(nullptr, nullptr));

View file

@ -26,7 +26,7 @@
ErrorOr<int> serenity_main(Main::Arguments arguments) ErrorOr<int> serenity_main(Main::Arguments arguments)
{ {
TRY(Core::System::pledge("stdio recvfd sendfd rpath fattr unix cpath wpath thread", nullptr)); TRY(Core::System::pledge("stdio recvfd sendfd rpath fattr unix cpath wpath thread"));
auto app = GUI::Application::construct(arguments); auto app = GUI::Application::construct(arguments);

View file

@ -159,7 +159,7 @@ public:
ErrorOr<int> serenity_main(Main::Arguments arguments) ErrorOr<int> serenity_main(Main::Arguments arguments)
{ {
TRY(Core::System::pledge("stdio recvfd sendfd thread rpath cpath wpath unix", nullptr)); TRY(Core::System::pledge("stdio recvfd sendfd thread rpath cpath wpath unix"));
auto app = GUI::Application::construct(arguments); auto app = GUI::Application::construct(arguments);
@ -182,7 +182,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
} }
} }
TRY(Core::System::pledge("stdio recvfd sendfd thread rpath unix", nullptr)); TRY(Core::System::pledge("stdio recvfd sendfd thread rpath unix"));
TRY(Core::System::unveil("/tmp/portal/filesystemaccess", "rw")); TRY(Core::System::unveil("/tmp/portal/filesystemaccess", "rw"));
TRY(Core::System::unveil("/res", "r")); TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil(nullptr, nullptr)); TRY(Core::System::unveil(nullptr, nullptr));