mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 13:47:46 +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
|
@ -286,7 +286,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
{
|
||||
auto app = GUI::Application::construct(arguments);
|
||||
|
||||
TRY(Core::System::pledge("stdio thread recvfd sendfd rpath unix", nullptr));
|
||||
TRY(Core::System::pledge("stdio thread recvfd sendfd rpath unix"));
|
||||
|
||||
TRY(Core::System::unveil("/tmp/portal/filesystemaccess", "rw"));
|
||||
TRY(Core::System::unveil("/home/anon/Documents/3D Models/teapot.obj", "r"));
|
||||
|
|
|
@ -39,7 +39,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
return 1;
|
||||
}
|
||||
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd unix cpath rpath wpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd unix cpath rpath wpath"));
|
||||
|
||||
const char* specified_url = nullptr;
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio rpath recvfd sendfd unix", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath recvfd sendfd unix"));
|
||||
auto app = TRY(GUI::Application::try_create(arguments));
|
||||
Config::pledge_domains("Browser");
|
||||
|
||||
|
|
|
@ -20,10 +20,10 @@
|
|||
|
||||
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));
|
||||
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath"));
|
||||
TRY(Core::System::unveil("/res", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ static bool add_launch_handler_actions_to_menu(RefPtr<GUI::Menu>& menu, Director
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio thread recvfd sendfd unix cpath rpath wpath fattr proc exec sigaction", nullptr));
|
||||
TRY(Core::System::pledge("stdio thread recvfd sendfd unix cpath rpath wpath fattr proc exec sigaction"));
|
||||
|
||||
struct sigaction act = {};
|
||||
act.sa_flags = SA_NOCLDWAIT;
|
||||
|
@ -84,7 +84,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto app = TRY(GUI::Application::try_create(arguments));
|
||||
|
||||
TRY(Core::System::pledge("stdio thread recvfd sendfd cpath rpath wpath fattr proc exec unix", nullptr));
|
||||
TRY(Core::System::pledge("stdio thread recvfd sendfd cpath rpath wpath fattr proc exec unix"));
|
||||
|
||||
Config::pledge_domains({ "FileManager", "WindowManager" });
|
||||
Config::monitor_domain("FileManager");
|
||||
|
|
|
@ -20,14 +20,14 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd thread rpath unix cpath wpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd thread rpath unix cpath wpath"));
|
||||
|
||||
auto app = TRY(GUI::Application::try_create(arguments));
|
||||
|
||||
TRY(Desktop::Launcher::add_allowed_handler_with_only_specific_urls("/bin/Help", { URL::create_with_file_protocol("/usr/share/man/man1/FontEditor.md") }));
|
||||
TRY(Desktop::Launcher::seal_allowlist());
|
||||
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd thread rpath cpath wpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd thread rpath cpath wpath"));
|
||||
|
||||
const char* path = nullptr;
|
||||
Core::ArgsParser args_parser;
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
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));
|
||||
|
||||
TRY(Core::System::unveil("/res", "r"));
|
||||
|
|
|
@ -34,7 +34,7 @@ using namespace ImageViewer;
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath wpath cpath unix thread", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath wpath cpath unix thread"));
|
||||
|
||||
auto app = TRY(GUI::Application::try_create(arguments));
|
||||
|
||||
|
|
|
@ -17,11 +17,11 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio rpath cpath wpath recvfd sendfd unix proc exec", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath cpath wpath recvfd sendfd unix proc exec"));
|
||||
auto app = TRY(GUI::Application::try_create(arguments));
|
||||
Config::pledge_domains("KeyboardSettings");
|
||||
|
||||
TRY(Core::System::pledge("stdio rpath cpath wpath recvfd sendfd proc exec", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath cpath wpath recvfd sendfd proc exec"));
|
||||
TRY(Core::System::unveil("/res", "r"));
|
||||
TRY(Core::System::unveil("/bin/keymap", "x"));
|
||||
TRY(Core::System::unveil("/proc/keymap", "r"));
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath unix inet", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath unix inet"));
|
||||
|
||||
auto app = GUI::Application::construct(arguments);
|
||||
|
||||
|
|
|
@ -17,11 +17,11 @@
|
|||
|
||||
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 = TRY(GUI::Application::try_create(arguments));
|
||||
|
||||
TRY(Core::System::pledge("stdio cpath rpath recvfd sendfd", nullptr));
|
||||
TRY(Core::System::pledge("stdio cpath rpath recvfd sendfd"));
|
||||
|
||||
auto app_icon = GUI::Icon::default_icon("app-mouse");
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio thread rpath cpath wpath recvfd sendfd unix", nullptr));
|
||||
TRY(Core::System::pledge("stdio thread rpath cpath wpath recvfd sendfd unix"));
|
||||
|
||||
auto app = GUI::Application::construct(arguments);
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio thread recvfd sendfd rpath unix wpath cpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio thread recvfd sendfd rpath unix wpath cpath"));
|
||||
|
||||
auto app = GUI::Application::construct(arguments);
|
||||
Config::pledge_domains("PixelPaint");
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd thread cpath rpath wpath unix proc exec", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd thread cpath rpath wpath unix proc exec"));
|
||||
|
||||
auto app = TRY(GUI::Application::try_create(arguments));
|
||||
auto window = TRY(RunWindow::try_create());
|
||||
|
|
|
@ -70,11 +70,11 @@ private:
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio thread recvfd sendfd rpath cpath wpath unix proc exec", nullptr));
|
||||
TRY(Core::System::pledge("stdio thread recvfd sendfd rpath cpath wpath unix proc exec"));
|
||||
|
||||
auto app = TRY(GUI::Application::try_create(arguments));
|
||||
|
||||
TRY(Core::System::pledge("stdio thread recvfd sendfd rpath cpath wpath proc exec", nullptr));
|
||||
TRY(Core::System::pledge("stdio thread recvfd sendfd rpath cpath wpath proc exec"));
|
||||
|
||||
auto app_icon = GUI::Icon::default_icon("app-settings");
|
||||
|
||||
|
|
|
@ -223,7 +223,7 @@ static ErrorOr<NonnullRefPtr<GUI::Window>> create_find_window(VT::TerminalWidget
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio tty rpath cpath wpath recvfd sendfd proc exec unix sigaction", nullptr));
|
||||
TRY(Core::System::pledge("stdio tty rpath cpath wpath recvfd sendfd proc exec unix sigaction"));
|
||||
|
||||
struct sigaction act;
|
||||
memset(&act, 0, sizeof(act));
|
||||
|
@ -234,7 +234,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto app = TRY(GUI::Application::try_create(arguments));
|
||||
|
||||
TRY(Core::System::pledge("stdio tty rpath cpath wpath recvfd sendfd proc exec unix", nullptr));
|
||||
TRY(Core::System::pledge("stdio tty rpath cpath wpath recvfd sendfd proc exec unix"));
|
||||
|
||||
Config::pledge_domains("Terminal");
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ using namespace TextEditor;
|
|||
|
||||
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 = TRY(GUI::Application::try_create(arguments));
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath unix proc exec", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath unix proc exec"));
|
||||
auto app = TRY(GUI::Application::try_create(arguments));
|
||||
|
||||
Config::pledge_domains("SystemServer");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue