mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
Everywhere: Use default execpromises argument for Core::System::pledge
This commit is contained in:
parent
44ffe3e5bb
commit
cf4fa936be
Notes:
sideshowbarker
2024-07-18 00:36:33 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/cf4fa936be6 Pull-request: https://github.com/SerenityOS/serenity/pull/11106
87 changed files with 132 additions and 132 deletions
|
@ -212,7 +212,7 @@ private:
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath wpath cpath unix", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath wpath cpath unix"));
|
||||
|
||||
auto app = TRY(GUI::Application::try_create(arguments));
|
||||
Config::pledge_domains("AudioApplet");
|
||||
|
@ -231,7 +231,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
// This positioning code depends on the window actually existing.
|
||||
static_cast<AudioWidget*>(window->main_widget())->set_audio_widget_size(Config::read_bool("AudioApplet", "Applet", "ShowPercent", false));
|
||||
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath"));
|
||||
|
||||
return app->exec();
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ private:
|
|||
|
||||
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));
|
||||
|
||||
TRY(Core::System::unveil("/res", "r"));
|
||||
|
|
|
@ -185,11 +185,11 @@ private:
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd proc exec rpath unix", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd proc exec rpath unix"));
|
||||
|
||||
auto app = GUI::Application::construct(arguments);
|
||||
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd proc exec rpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd proc exec rpath"));
|
||||
|
||||
const char* cpu = nullptr;
|
||||
const char* memory = nullptr;
|
||||
|
|
|
@ -14,14 +14,14 @@
|
|||
|
||||
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));
|
||||
|
||||
// We need to obtain the WM connection here as well before the pledge shortening.
|
||||
GUI::WindowManagerServerConnection::the();
|
||||
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath"));
|
||||
|
||||
auto window = TRY(DesktopStatusWindow::try_create());
|
||||
window->set_title("WorkspacePicker");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -19,12 +19,12 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath wpath cpath unix", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath wpath cpath unix"));
|
||||
|
||||
auto app = TRY(GUI::Application::try_create(arguments));
|
||||
auto app_icon = GUI::Icon::default_icon("app-catdog");
|
||||
|
||||
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));
|
||||
|
||||
|
|
|
@ -204,7 +204,7 @@ ErrorOr<int> serenity_main(Main::Arguments 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("/res", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
|
|
|
@ -31,11 +31,11 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
args_parser.add_option(grid_columns, "Number of columns in grid (incompatible with --number)", "grid-cols", 'c', "number");
|
||||
args_parser.parse(arguments);
|
||||
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath unix cpath wpath thread", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath unix cpath wpath thread"));
|
||||
|
||||
auto app = TRY(GUI::Application::try_create(arguments));
|
||||
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath cpath wpath thread", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath cpath wpath thread"));
|
||||
TRY(Core::System::unveil("/res", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
|
|
|
@ -201,7 +201,7 @@ ErrorOr<int> serenity_main(Main::Arguments 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("/res", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
|
|
|
@ -188,7 +188,7 @@ ErrorOr<int> serenity_main(Main::Arguments 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("/res", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ ErrorOr<int> serenity_main(Main::Arguments 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("/res", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
|
|
|
@ -377,7 +377,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
{
|
||||
auto app = TRY(GUI::Application::try_create(arguments));
|
||||
|
||||
TRY(Core::System::pledge("stdio thread recvfd sendfd rpath wpath cpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio thread recvfd sendfd rpath wpath cpath"));
|
||||
|
||||
#if 0
|
||||
TRY(Core::System::unveil("/res", "r"));
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath wpath cpath unix", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath wpath cpath 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"));
|
||||
|
||||
auto app_icon = GUI::Icon::default_icon("app-model-gallery");
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
auto app = TRY(GUI::Application::try_create(arguments));
|
||||
auto app_icon = GUI::Icon::default_icon("app-mouse");
|
||||
|
||||
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));
|
||||
|
||||
|
|
|
@ -114,11 +114,11 @@ void Screensaver::draw()
|
|||
|
||||
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));
|
||||
|
||||
TRY(Core::System::pledge("stdio rpath recvfd sendfd", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath recvfd sendfd"));
|
||||
TRY(Core::System::unveil("/res", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ void Starfield::draw()
|
|||
|
||||
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"));
|
||||
|
||||
unsigned star_count = 1000;
|
||||
unsigned refresh_rate = 16;
|
||||
|
@ -165,7 +165,7 @@ ErrorOr<int> serenity_main(Main::Arguments 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"));
|
||||
|
||||
auto app_icon = GUI::Icon::default_icon("app-screensaver");
|
||||
auto window = TRY(GUI::Window::try_create());
|
||||
|
|
|
@ -14,10 +14,10 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath unix thread", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath unix thread"));
|
||||
auto app = TRY(GUI::Application::try_create(arguments));
|
||||
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath thread", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath thread"));
|
||||
TRY(Core::System::unveil("/res", "r"));
|
||||
TRY(Core::System::unveil("/home/anon", "r"));
|
||||
TRY(Core::System::unveil("/etc/FileIconProvider.ini", "r"));
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -26,7 +26,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"));
|
||||
|
||||
srand(time(nullptr));
|
||||
|
||||
|
@ -37,7 +37,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
Config::pledge_domains("2048");
|
||||
|
||||
TRY(Core::System::pledge("stdio rpath recvfd sendfd", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath recvfd sendfd"));
|
||||
|
||||
TRY(Core::System::unveil("/res", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
|
||||
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));
|
||||
|
|
|
@ -21,13 +21,13 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio rpath wpath cpath recvfd sendfd thread proc exec unix", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath wpath cpath recvfd sendfd thread proc exec unix"));
|
||||
|
||||
auto app = TRY(GUI::Application::try_create(arguments));
|
||||
|
||||
Config::pledge_domains("Chess");
|
||||
|
||||
TRY(Core::System::pledge("stdio rpath wpath cpath recvfd sendfd thread proc exec", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath wpath cpath recvfd sendfd thread proc exec"));
|
||||
|
||||
auto app_icon = GUI::Icon::default_icon("app-chess");
|
||||
|
||||
|
|
|
@ -17,13 +17,13 @@
|
|||
|
||||
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("FlappyBug");
|
||||
|
||||
TRY(Core::System::pledge("stdio rpath recvfd sendfd", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath recvfd sendfd"));
|
||||
|
||||
TRY(Core::System::unveil("/res", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
|
|
@ -25,11 +25,11 @@ const char* click_tip = "Tip: click the board to toggle individual cells, or cli
|
|||
|
||||
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));
|
||||
|
||||
TRY(Core::System::pledge("stdio rpath recvfd sendfd", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath recvfd sendfd"));
|
||||
|
||||
TRY(Core::System::unveil("/res", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
|
|
@ -31,7 +31,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
Config::pledge_domains("Hearts");
|
||||
|
||||
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));
|
||||
|
|
|
@ -24,13 +24,13 @@
|
|||
|
||||
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("Minesweeper");
|
||||
|
||||
TRY(Core::System::pledge("stdio rpath recvfd sendfd", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath recvfd sendfd"));
|
||||
|
||||
TRY(Core::System::unveil("/res", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
|
||||
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));
|
||||
|
||||
TRY(Core::System::pledge("stdio rpath recvfd sendfd", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath recvfd sendfd"));
|
||||
|
||||
TRY(Core::System::unveil("/res", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
|
|
@ -20,13 +20,13 @@
|
|||
|
||||
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("Snake");
|
||||
|
||||
TRY(Core::System::pledge("stdio rpath recvfd sendfd", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath recvfd sendfd"));
|
||||
|
||||
TRY(Core::System::unveil("/res", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
|
|
@ -24,14 +24,14 @@
|
|||
|
||||
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_icon = GUI::Icon::default_icon("app-solitaire");
|
||||
|
||||
Config::pledge_domains("Solitaire");
|
||||
|
||||
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));
|
||||
|
|
|
@ -39,14 +39,14 @@ static String format_seconds(uint64_t seconds_elapsed)
|
|||
|
||||
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_icon = GUI::Icon::default_icon("app-spider");
|
||||
|
||||
Config::pledge_domains("Spider");
|
||||
|
||||
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));
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd accept", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd accept"));
|
||||
Core::EventLoop event_loop;
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio accept rpath wpath cpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio accept rpath wpath cpath"));
|
||||
TRY(Core::System::unveil(Core::StandardPaths::config_directory(), "rwc"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ static void launch_crash_reporter(const String& coredump_path, bool unlink_on_ex
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio rpath wpath cpath proc exec", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath wpath cpath proc exec"));
|
||||
|
||||
Core::BlockingFileWatcher watcher;
|
||||
TRY(watcher.add_watch("/tmp/coredump", Core::FileWatcherEvent::Type::ChildCreated));
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath cpath wpath unix thread", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath cpath wpath unix thread"));
|
||||
|
||||
auto app = GUI::Application::construct(0, nullptr);
|
||||
app->set_quit_when_last_window_deleted(false);
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
ErrorOr<int> serenity_main(Main::Arguments)
|
||||
{
|
||||
Core::EventLoop event_loop;
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd unix", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd unix"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
auto socket = TRY(Core::LocalSocket::take_over_accepted_socket_from_system_server());
|
||||
IPC::new_client_connection<ImageDecoder::ClientConnection>(move(socket), 1);
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd"));
|
||||
return event_loop.exec();
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
{
|
||||
auto app = GUI::Application::construct(arguments);
|
||||
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath exec proc id", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath exec proc id"));
|
||||
TRY(Core::System::unveil("/home", "r"));
|
||||
TRY(Core::System::unveil("/etc/passwd", "r"));
|
||||
TRY(Core::System::unveil("/etc/shadow", "r"));
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio accept unix inet rpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio accept unix inet rpath"));
|
||||
Core::EventLoop event_loop;
|
||||
auto server = TRY(LookupServer::LookupServer::try_create());
|
||||
|
||||
TRY(Core::System::pledge("stdio accept inet rpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio accept inet rpath"));
|
||||
TRY(Core::System::unveil("/proc/net/adapters", "r"));
|
||||
TRY(Core::System::unveil("/etc/hosts", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd accept rpath unix", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd accept rpath unix"));
|
||||
|
||||
auto app = TRY(GUI::Application::try_create(arguments));
|
||||
auto server = TRY(Core::LocalServer::try_create());
|
||||
|
@ -33,7 +33,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
TRY(Core::System::unveil("/res", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd accept rpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd accept rpath"));
|
||||
|
||||
return app->exec();
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio inet accept unix rpath sendfd recvfd sigaction", nullptr));
|
||||
TRY(Core::System::pledge("stdio inet accept unix rpath sendfd recvfd sigaction"));
|
||||
|
||||
signal(SIGINFO, [](int) { RequestServer::ConnectionCache::dump_jobs(); });
|
||||
|
||||
|
@ -28,7 +28,7 @@ ErrorOr<int> serenity_main(Main::Arguments)
|
|||
|
||||
Core::EventLoop event_loop;
|
||||
// FIXME: Establish a connection to LookupServer and then drop "unix"?
|
||||
TRY(Core::System::pledge("stdio inet accept unix sendfd recvfd", nullptr));
|
||||
TRY(Core::System::pledge("stdio inet accept unix sendfd recvfd"));
|
||||
TRY(Core::System::unveil("/tmp/portal/lookup", "rw"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ static ErrorOr<NonnullRefPtr<GUI::Menu>> build_system_menu();
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd proc exec rpath unix sigaction", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd proc exec rpath unix sigaction"));
|
||||
auto app = TRY(GUI::Application::try_create(arguments));
|
||||
Config::pledge_domains("Taskbar");
|
||||
Config::monitor_domain("Taskbar");
|
||||
|
@ -49,7 +49,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
// We need to obtain the WM connection here as well before the pledge shortening.
|
||||
GUI::WindowManagerServerConnection::the();
|
||||
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd proc exec rpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd proc exec rpath"));
|
||||
|
||||
auto menu = TRY(build_system_menu());
|
||||
menu->realize_menu_if_needed();
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
ErrorOr<int> serenity_main(Main::Arguments)
|
||||
{
|
||||
Core::EventLoop event_loop;
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd accept unix rpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd accept unix rpath"));
|
||||
TRY(Core::System::unveil("/res", "r"));
|
||||
TRY(Core::System::unveil("/tmp/portal/request", "rw"));
|
||||
TRY(Core::System::unveil("/tmp/portal/image", "rw"));
|
||||
|
|
|
@ -60,7 +60,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
return 1;
|
||||
}
|
||||
|
||||
TRY(Core::System::pledge("stdio accept rpath inet unix", nullptr));
|
||||
TRY(Core::System::pledge("stdio accept rpath inet unix"));
|
||||
|
||||
WebServer::Configuration configuration(real_root_path);
|
||||
|
||||
|
@ -89,6 +89,6 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
TRY(Core::System::unveil(real_root_path.characters(), "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
TRY(Core::System::pledge("stdio accept rpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio accept rpath"));
|
||||
return loop.exec();
|
||||
}
|
||||
|
|
|
@ -14,14 +14,14 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio inet unix rpath sendfd recvfd", nullptr));
|
||||
TRY(Core::System::pledge("stdio inet unix rpath sendfd recvfd"));
|
||||
|
||||
// Ensure the certificates are read out here.
|
||||
[[maybe_unused]] auto& certs = DefaultRootCACertificates::the();
|
||||
|
||||
Core::EventLoop event_loop;
|
||||
// FIXME: Establish a connection to LookupServer and then drop "unix"?
|
||||
TRY(Core::System::pledge("stdio inet unix sendfd recvfd", nullptr));
|
||||
TRY(Core::System::pledge("stdio inet unix sendfd recvfd"));
|
||||
TRY(Core::System::unveil("/tmp/portal/lookup", "rw"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio video thread sendfd recvfd accept rpath wpath cpath unix proc sigaction", nullptr));
|
||||
TRY(Core::System::pledge("stdio video thread sendfd recvfd accept rpath wpath cpath unix proc sigaction"));
|
||||
TRY(Core::System::unveil("/res", "r"));
|
||||
TRY(Core::System::unveil("/tmp", "cw"));
|
||||
TRY(Core::System::unveil("/etc/WindowServer.ini", "rwc"));
|
||||
|
@ -48,7 +48,7 @@ ErrorOr<int> serenity_main(Main::Arguments)
|
|||
|
||||
WindowServer::EventLoop loop;
|
||||
|
||||
TRY(Core::System::pledge("stdio video thread sendfd recvfd accept rpath wpath cpath proc", nullptr));
|
||||
TRY(Core::System::pledge("stdio video thread sendfd recvfd accept rpath wpath cpath proc"));
|
||||
|
||||
// First check which screens are explicitly configured
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio rpath tty", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath tty"));
|
||||
TRY(Core::System::unveil("/proc/net/arp", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio rpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath"));
|
||||
|
||||
bool decode = false;
|
||||
const char* filepath = nullptr;
|
||||
|
@ -43,7 +43,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
buffer = file->read_all();
|
||||
}
|
||||
|
||||
TRY(Core::System::pledge("stdio", nullptr));
|
||||
TRY(Core::System::pledge("stdio"));
|
||||
|
||||
if (decode) {
|
||||
auto decoded = decode_base64(StringView(buffer));
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio", nullptr));
|
||||
TRY(Core::System::pledge("stdio"));
|
||||
|
||||
StringView path;
|
||||
StringView suffix;
|
||||
|
|
|
@ -26,7 +26,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
{
|
||||
TRY(Core::System::unveil("/dev", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath"));
|
||||
|
||||
const char* device = nullptr;
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio rpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath"));
|
||||
auto hostname = TRY(Core::System::gethostname());
|
||||
|
||||
Core::ArgsParser args_parser;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio rpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath"));
|
||||
|
||||
Vector<StringView> paths;
|
||||
|
||||
|
@ -43,7 +43,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
}
|
||||
}
|
||||
|
||||
TRY(Core::System::pledge("stdio", nullptr));
|
||||
TRY(Core::System::pledge("stdio"));
|
||||
|
||||
Array<u8, 32768> buffer;
|
||||
for (auto& fd : fds) {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio rpath wpath cpath fattr chown", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath wpath cpath fattr chown"));
|
||||
|
||||
bool link = false;
|
||||
bool preserve = false;
|
||||
|
@ -36,7 +36,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
if (preserve) {
|
||||
umask(0);
|
||||
} else {
|
||||
TRY(Core::System::pledge("stdio rpath wpath cpath fattr", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath wpath cpath fattr"));
|
||||
}
|
||||
|
||||
bool destination_is_existing_dir = Core::File::is_directory(destination);
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio rpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath"));
|
||||
TRY(Core::System::unveil("/proc/dmesg", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ static String interpret_backslash_escapes(StringView string, bool& no_trailing_n
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio", nullptr));
|
||||
TRY(Core::System::pledge("stdio"));
|
||||
|
||||
Vector<const char*> text;
|
||||
bool no_trailing_newline = false;
|
||||
|
|
|
@ -28,7 +28,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
TRY(Core::System::unveil("/etc/passwd", "r"));
|
||||
TRY(Core::System::unveil("/etc/group", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath"));
|
||||
|
||||
Core::ArgsParser args_parser;
|
||||
args_parser.add_option(flag_print_uid, "Print UID", nullptr, 'u');
|
||||
|
|
|
@ -1158,7 +1158,7 @@ public:
|
|||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
#ifdef __serenity__
|
||||
TRY(Core::System::pledge("stdio rpath wpath cpath tty sigaction", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath wpath cpath tty sigaction"));
|
||||
#endif
|
||||
|
||||
bool gc_on_every_allocation = false;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio setkeymap getkeymap rpath wpath cpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio setkeymap getkeymap rpath wpath cpath"));
|
||||
TRY(Core::System::unveil("/res/keymaps", "r"));
|
||||
TRY(Core::System::unveil("/etc/Keyboard.ini", "rwc"));
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ static Core::ProcessStatistics const& get_proc(Core::AllProcessesStatistics cons
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio proc rpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio proc rpath"));
|
||||
TRY(Core::System::unveil("/proc/all", "r"));
|
||||
TRY(Core::System::unveil("/etc/passwd", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio rpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath"));
|
||||
TRY(Core::System::unveil("/sys/bus/usb", "r"));
|
||||
TRY(Core::System::unveil("/res/usb.ids", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
|
|
@ -54,7 +54,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
if (view_width == 0)
|
||||
view_width = 80;
|
||||
|
||||
TRY(Core::System::pledge("stdio rpath exec proc", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath exec proc"));
|
||||
TRY(Core::System::unveil("/usr/share/man", "r"));
|
||||
TRY(Core::System::unveil("/bin", "x"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
@ -108,7 +108,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto file = TRY(Core::File::open(filename, Core::OpenMode::ReadOnly));
|
||||
|
||||
TRY(Core::System::pledge("stdio proc", nullptr));
|
||||
TRY(Core::System::pledge("stdio proc"));
|
||||
|
||||
dbgln("Loading man page from {}", file->filename());
|
||||
auto buffer = file->read_all();
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio rpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath"));
|
||||
auto file = TRY(Core::File::open("/proc/cpuinfo", Core::OpenMode::ReadOnly));
|
||||
|
||||
auto buffer = file->read_all();
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio rpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath"));
|
||||
TRY(Core::System::unveil("/proc", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
|
|
|
@ -13,10 +13,10 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio rpath tty", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath tty"));
|
||||
String this_tty = ttyname(STDIN_FILENO);
|
||||
|
||||
TRY(Core::System::pledge("stdio rpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath"));
|
||||
TRY(Core::System::unveil("/proc/all", "r"));
|
||||
TRY(Core::System::unveil("/etc/passwd", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
|
|
@ -20,7 +20,7 @@ enum TruncateOperation {
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio rpath wpath cpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath wpath cpath"));
|
||||
|
||||
const char* resize = nullptr;
|
||||
const char* reference = nullptr;
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio wpath rpath cpath fattr proc exec", nullptr));
|
||||
TRY(Core::System::pledge("stdio wpath rpath cpath fattr proc exec"));
|
||||
TRY(Core::System::unveil("/etc/", "rwc"));
|
||||
TRY(Core::System::unveil("/bin/rm", "x"));
|
||||
|
||||
|
@ -53,7 +53,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
if (remove_home) {
|
||||
TRY(Core::System::unveil(target_account.home_directory().characters(), "c"));
|
||||
} else {
|
||||
TRY(Core::System::pledge("stdio wpath rpath cpath fattr", nullptr));
|
||||
TRY(Core::System::pledge("stdio wpath rpath cpath fattr"));
|
||||
}
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
return 1;
|
||||
}
|
||||
|
||||
TRY(Core::System::pledge("stdio wpath rpath cpath fattr tty", nullptr));
|
||||
TRY(Core::System::pledge("stdio wpath rpath cpath fattr tty"));
|
||||
TRY(Core::System::unveil("/etc", "rwc"));
|
||||
|
||||
int uid = 0;
|
||||
|
@ -136,7 +136,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
target_account.set_gecos(gecos);
|
||||
}
|
||||
|
||||
TRY(Core::System::pledge("stdio wpath rpath cpath fattr", nullptr));
|
||||
TRY(Core::System::pledge("stdio wpath rpath cpath fattr"));
|
||||
if (!target_account.sync()) {
|
||||
perror("Core::Account::Sync");
|
||||
return 1;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio wpath cpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio wpath cpath"));
|
||||
TRY(Core::System::unveil("/var/run/utmp", "rwc"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio rpath", nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath"));
|
||||
TRY(Core::System::unveil("/dev", "r"));
|
||||
TRY(Core::System::unveil("/etc/passwd", "r"));
|
||||
TRY(Core::System::unveil("/var/run/utmp", "r"));
|
||||
|
|
Loading…
Reference in a new issue