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:
parent
7c0495cbac
commit
9cfd520bb8
Notes:
sideshowbarker
2024-07-17 14:28:46 +09:00
Author: https://github.com/bgianfo
Commit: 9cfd520bb8
Pull-request: https://github.com/SerenityOS/serenity/pull/13496
Reviewed-by: https://github.com/awesomekling ✅
6 changed files with 9 additions and 9 deletions
|
@ -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");
|
||||||
|
|
||||||
|
|
|
@ -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));
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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));
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
|
||||||
|
|
|
@ -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));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue