diff options
author | Brian Gianforcaro <bgianf@serenityos.org> | 2021-11-27 14:26:34 -0800 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-28 08:04:57 +0100 |
commit | cf4fa936be63a8f5931886142daca54b99293a52 (patch) | |
tree | fcb69966e7fd2a16d30ed2e40e85d2245f1dd409 /Userland | |
parent | 44ffe3e5bb2659fcd4bcd65adaf5fb6e855a9c4f (diff) | |
download | serenity-cf4fa936be63a8f5931886142daca54b99293a52.zip |
Everywhere: Use default execpromises argument for Core::System::pledge
Diffstat (limited to 'Userland')
87 files changed, 132 insertions, 132 deletions
diff --git a/Userland/Applets/Audio/main.cpp b/Userland/Applets/Audio/main.cpp index 8268a479ba..9b7c7de884 100644 --- a/Userland/Applets/Audio/main.cpp +++ b/Userland/Applets/Audio/main.cpp @@ -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(); } diff --git a/Userland/Applets/Network/main.cpp b/Userland/Applets/Network/main.cpp index 08b0b61665..edae11ced7 100644 --- a/Userland/Applets/Network/main.cpp +++ b/Userland/Applets/Network/main.cpp @@ -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")); diff --git a/Userland/Applets/ResourceGraph/main.cpp b/Userland/Applets/ResourceGraph/main.cpp index 966039a445..c4120283b7 100644 --- a/Userland/Applets/ResourceGraph/main.cpp +++ b/Userland/Applets/ResourceGraph/main.cpp @@ -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; diff --git a/Userland/Applets/WorkspacePicker/main.cpp b/Userland/Applets/WorkspacePicker/main.cpp index 280de6ab85..0bdae21bdb 100644 --- a/Userland/Applets/WorkspacePicker/main.cpp +++ b/Userland/Applets/WorkspacePicker/main.cpp @@ -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"); diff --git a/Userland/Applications/3DFileViewer/main.cpp b/Userland/Applications/3DFileViewer/main.cpp index 96be3b80f9..6e96db149a 100644 --- a/Userland/Applications/3DFileViewer/main.cpp +++ b/Userland/Applications/3DFileViewer/main.cpp @@ -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")); diff --git a/Userland/Applications/Browser/main.cpp b/Userland/Applications/Browser/main.cpp index 6520ad1c81..ccbd85693b 100644 --- a/Userland/Applications/Browser/main.cpp +++ b/Userland/Applications/Browser/main.cpp @@ -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; diff --git a/Userland/Applications/BrowserSettings/main.cpp b/Userland/Applications/BrowserSettings/main.cpp index 55c12a8068..3d35037b03 100644 --- a/Userland/Applications/BrowserSettings/main.cpp +++ b/Userland/Applications/BrowserSettings/main.cpp @@ -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"); diff --git a/Userland/Applications/Calculator/main.cpp b/Userland/Applications/Calculator/main.cpp index 2ebc65f157..f68aacfc7a 100644 --- a/Userland/Applications/Calculator/main.cpp +++ b/Userland/Applications/Calculator/main.cpp @@ -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)); diff --git a/Userland/Applications/FileManager/main.cpp b/Userland/Applications/FileManager/main.cpp index cbb0dc769b..b4fbeaed69 100644 --- a/Userland/Applications/FileManager/main.cpp +++ b/Userland/Applications/FileManager/main.cpp @@ -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"); diff --git a/Userland/Applications/FontEditor/main.cpp b/Userland/Applications/FontEditor/main.cpp index 388454448b..41dfae7798 100644 --- a/Userland/Applications/FontEditor/main.cpp +++ b/Userland/Applications/FontEditor/main.cpp @@ -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; diff --git a/Userland/Applications/Help/main.cpp b/Userland/Applications/Help/main.cpp index b2969cbec8..5cca740941 100644 --- a/Userland/Applications/Help/main.cpp +++ b/Userland/Applications/Help/main.cpp @@ -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")); diff --git a/Userland/Applications/ImageViewer/main.cpp b/Userland/Applications/ImageViewer/main.cpp index e6cc44b60a..477b40ea90 100644 --- a/Userland/Applications/ImageViewer/main.cpp +++ b/Userland/Applications/ImageViewer/main.cpp @@ -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)); diff --git a/Userland/Applications/KeyboardSettings/main.cpp b/Userland/Applications/KeyboardSettings/main.cpp index 4e0da94d8b..93bbbda3f5 100644 --- a/Userland/Applications/KeyboardSettings/main.cpp +++ b/Userland/Applications/KeyboardSettings/main.cpp @@ -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")); diff --git a/Userland/Applications/Mail/main.cpp b/Userland/Applications/Mail/main.cpp index 83a6931434..9611491040 100644 --- a/Userland/Applications/Mail/main.cpp +++ b/Userland/Applications/Mail/main.cpp @@ -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); diff --git a/Userland/Applications/MouseSettings/main.cpp b/Userland/Applications/MouseSettings/main.cpp index d864582316..c795f2748a 100644 --- a/Userland/Applications/MouseSettings/main.cpp +++ b/Userland/Applications/MouseSettings/main.cpp @@ -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"); diff --git a/Userland/Applications/Piano/main.cpp b/Userland/Applications/Piano/main.cpp index 4f8d48fc3e..c5927129da 100644 --- a/Userland/Applications/Piano/main.cpp +++ b/Userland/Applications/Piano/main.cpp @@ -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); diff --git a/Userland/Applications/PixelPaint/main.cpp b/Userland/Applications/PixelPaint/main.cpp index 1c1cd1443b..9b9fa75c20 100644 --- a/Userland/Applications/PixelPaint/main.cpp +++ b/Userland/Applications/PixelPaint/main.cpp @@ -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"); diff --git a/Userland/Applications/Run/main.cpp b/Userland/Applications/Run/main.cpp index 207839b8ec..b8c5a37dac 100644 --- a/Userland/Applications/Run/main.cpp +++ b/Userland/Applications/Run/main.cpp @@ -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()); diff --git a/Userland/Applications/Settings/main.cpp b/Userland/Applications/Settings/main.cpp index 7d470bb8d9..83329e7512 100644 --- a/Userland/Applications/Settings/main.cpp +++ b/Userland/Applications/Settings/main.cpp @@ -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"); diff --git a/Userland/Applications/Terminal/main.cpp b/Userland/Applications/Terminal/main.cpp index 6fbad746ce..665527913f 100644 --- a/Userland/Applications/Terminal/main.cpp +++ b/Userland/Applications/Terminal/main.cpp @@ -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"); diff --git a/Userland/Applications/TextEditor/main.cpp b/Userland/Applications/TextEditor/main.cpp index 5d3e42e1af..39dafd459e 100644 --- a/Userland/Applications/TextEditor/main.cpp +++ b/Userland/Applications/TextEditor/main.cpp @@ -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)); diff --git a/Userland/Applications/Welcome/main.cpp b/Userland/Applications/Welcome/main.cpp index c76c2a67e3..1772f76f20 100644 --- a/Userland/Applications/Welcome/main.cpp +++ b/Userland/Applications/Welcome/main.cpp @@ -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"); diff --git a/Userland/Demos/CatDog/main.cpp b/Userland/Demos/CatDog/main.cpp index d9cca2d534..1dd739e17c 100644 --- a/Userland/Demos/CatDog/main.cpp +++ b/Userland/Demos/CatDog/main.cpp @@ -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)); diff --git a/Userland/Demos/Cube/Cube.cpp b/Userland/Demos/Cube/Cube.cpp index c9914e03e1..21d6189301 100644 --- a/Userland/Demos/Cube/Cube.cpp +++ b/Userland/Demos/Cube/Cube.cpp @@ -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)); diff --git a/Userland/Demos/Eyes/main.cpp b/Userland/Demos/Eyes/main.cpp index f5e2cb734a..3960461ef7 100644 --- a/Userland/Demos/Eyes/main.cpp +++ b/Userland/Demos/Eyes/main.cpp @@ -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)); diff --git a/Userland/Demos/Fire/Fire.cpp b/Userland/Demos/Fire/Fire.cpp index 63f98edd5c..456712dbc2 100644 --- a/Userland/Demos/Fire/Fire.cpp +++ b/Userland/Demos/Fire/Fire.cpp @@ -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)); diff --git a/Userland/Demos/LibGfxDemo/main.cpp b/Userland/Demos/LibGfxDemo/main.cpp index 0910023373..f88d0c0277 100644 --- a/Userland/Demos/LibGfxDemo/main.cpp +++ b/Userland/Demos/LibGfxDemo/main.cpp @@ -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)); diff --git a/Userland/Demos/LibGfxScaleDemo/main.cpp b/Userland/Demos/LibGfxScaleDemo/main.cpp index be2b394c5f..671901d881 100644 --- a/Userland/Demos/LibGfxScaleDemo/main.cpp +++ b/Userland/Demos/LibGfxScaleDemo/main.cpp @@ -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)); diff --git a/Userland/Demos/Mandelbrot/Mandelbrot.cpp b/Userland/Demos/Mandelbrot/Mandelbrot.cpp index 352cf63bb8..e37406aadc 100644 --- a/Userland/Demos/Mandelbrot/Mandelbrot.cpp +++ b/Userland/Demos/Mandelbrot/Mandelbrot.cpp @@ -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")); diff --git a/Userland/Demos/ModelGallery/main.cpp b/Userland/Demos/ModelGallery/main.cpp index 228c89d971..903ef2ffe8 100644 --- a/Userland/Demos/ModelGallery/main.cpp +++ b/Userland/Demos/ModelGallery/main.cpp @@ -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"); diff --git a/Userland/Demos/Mouse/main.cpp b/Userland/Demos/Mouse/main.cpp index 57e2430ca7..a34c16181a 100644 --- a/Userland/Demos/Mouse/main.cpp +++ b/Userland/Demos/Mouse/main.cpp @@ -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)); diff --git a/Userland/Demos/Screensaver/Screensaver.cpp b/Userland/Demos/Screensaver/Screensaver.cpp index 87238803a8..2be7c58ca9 100644 --- a/Userland/Demos/Screensaver/Screensaver.cpp +++ b/Userland/Demos/Screensaver/Screensaver.cpp @@ -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)); diff --git a/Userland/Demos/Starfield/Starfield.cpp b/Userland/Demos/Starfield/Starfield.cpp index 5099d84f75..27a4419fad 100644 --- a/Userland/Demos/Starfield/Starfield.cpp +++ b/Userland/Demos/Starfield/Starfield.cpp @@ -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()); diff --git a/Userland/Demos/WidgetGallery/main.cpp b/Userland/Demos/WidgetGallery/main.cpp index 4484312577..1dc0bc2feb 100644 --- a/Userland/Demos/WidgetGallery/main.cpp +++ b/Userland/Demos/WidgetGallery/main.cpp @@ -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")); diff --git a/Userland/DevTools/HackStudio/LanguageServers/Cpp/main.cpp b/Userland/DevTools/HackStudio/LanguageServers/Cpp/main.cpp index 5a3b0e3cff..f0de352e66 100644 --- a/Userland/DevTools/HackStudio/LanguageServers/Cpp/main.cpp +++ b/Userland/DevTools/HackStudio/LanguageServers/Cpp/main.cpp @@ -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. diff --git a/Userland/DevTools/HackStudio/LanguageServers/Shell/main.cpp b/Userland/DevTools/HackStudio/LanguageServers/Shell/main.cpp index bfad0eb1fd..c7719fefba 100644 --- a/Userland/DevTools/HackStudio/LanguageServers/Shell/main.cpp +++ b/Userland/DevTools/HackStudio/LanguageServers/Shell/main.cpp @@ -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(); diff --git a/Userland/DevTools/HackStudio/main.cpp b/Userland/DevTools/HackStudio/main.cpp index 0d65db23d3..76f237afdc 100644 --- a/Userland/DevTools/HackStudio/main.cpp +++ b/Userland/DevTools/HackStudio/main.cpp @@ -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" }); diff --git a/Userland/DevTools/Inspector/main.cpp b/Userland/DevTools/Inspector/main.cpp index e9a5fe3682..033da44dca 100644 --- a/Userland/DevTools/Inspector/main.cpp +++ b/Userland/DevTools/Inspector/main.cpp @@ -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")); diff --git a/Userland/DevTools/Playground/main.cpp b/Userland/DevTools/Playground/main.cpp index ce7f4b1b08..98c76af01e 100644 --- a/Userland/DevTools/Playground/main.cpp +++ b/Userland/DevTools/Playground/main.cpp @@ -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; diff --git a/Userland/Games/2048/main.cpp b/Userland/Games/2048/main.cpp index cec1d5a07a..5c6c482b27 100644 --- a/Userland/Games/2048/main.cpp +++ b/Userland/Games/2048/main.cpp @@ -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)); diff --git a/Userland/Games/Breakout/main.cpp b/Userland/Games/Breakout/main.cpp index 8cd361aa88..943c04428d 100644 --- a/Userland/Games/Breakout/main.cpp +++ b/Userland/Games/Breakout/main.cpp @@ -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)); diff --git a/Userland/Games/Chess/main.cpp b/Userland/Games/Chess/main.cpp index a3c2709643..8e9d64e9b3 100644 --- a/Userland/Games/Chess/main.cpp +++ b/Userland/Games/Chess/main.cpp @@ -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"); diff --git a/Userland/Games/FlappyBug/main.cpp b/Userland/Games/FlappyBug/main.cpp index 4a6e9879b1..8526548081 100644 --- a/Userland/Games/FlappyBug/main.cpp +++ b/Userland/Games/FlappyBug/main.cpp @@ -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)); diff --git a/Userland/Games/GameOfLife/main.cpp b/Userland/Games/GameOfLife/main.cpp index ad249f201d..ce3c178b15 100644 --- a/Userland/Games/GameOfLife/main.cpp +++ b/Userland/Games/GameOfLife/main.cpp @@ -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)); diff --git a/Userland/Games/Hearts/main.cpp b/Userland/Games/Hearts/main.cpp index 56b2467e70..87ad5f2ddd 100644 --- a/Userland/Games/Hearts/main.cpp +++ b/Userland/Games/Hearts/main.cpp @@ -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)); diff --git a/Userland/Games/Minesweeper/main.cpp b/Userland/Games/Minesweeper/main.cpp index a88aed14c0..29f5c45f65 100644 --- a/Userland/Games/Minesweeper/main.cpp +++ b/Userland/Games/Minesweeper/main.cpp @@ -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)); diff --git a/Userland/Games/Pong/main.cpp b/Userland/Games/Pong/main.cpp index e0d1dab144..7acefde12b 100644 --- a/Userland/Games/Pong/main.cpp +++ b/Userland/Games/Pong/main.cpp @@ -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)); diff --git a/Userland/Games/Snake/main.cpp b/Userland/Games/Snake/main.cpp index 48f8328651..118e288ebf 100644 --- a/Userland/Games/Snake/main.cpp +++ b/Userland/Games/Snake/main.cpp @@ -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)); diff --git a/Userland/Games/Solitaire/main.cpp b/Userland/Games/Solitaire/main.cpp index 03ce534e91..5cd25e4961 100644 --- a/Userland/Games/Solitaire/main.cpp +++ b/Userland/Games/Solitaire/main.cpp @@ -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)); diff --git a/Userland/Games/Spider/main.cpp b/Userland/Games/Spider/main.cpp index 6246bbef1b..94d9cf6300 100644 --- a/Userland/Games/Spider/main.cpp +++ b/Userland/Games/Spider/main.cpp @@ -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)); diff --git a/Userland/Services/Clipboard/main.cpp b/Userland/Services/Clipboard/main.cpp index 217a989585..cd7d615afa 100644 --- a/Userland/Services/Clipboard/main.cpp +++ b/Userland/Services/Clipboard/main.cpp @@ -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)); diff --git a/Userland/Services/ConfigServer/main.cpp b/Userland/Services/ConfigServer/main.cpp index cde5a16075..ac97f033f1 100644 --- a/Userland/Services/ConfigServer/main.cpp +++ b/Userland/Services/ConfigServer/main.cpp @@ -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)); diff --git a/Userland/Services/CrashDaemon/main.cpp b/Userland/Services/CrashDaemon/main.cpp index c9c84324f2..927157ac59 100644 --- a/Userland/Services/CrashDaemon/main.cpp +++ b/Userland/Services/CrashDaemon/main.cpp @@ -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)); diff --git a/Userland/Services/FileSystemAccessServer/main.cpp b/Userland/Services/FileSystemAccessServer/main.cpp index 2e37422f19..68ea1730ef 100644 --- a/Userland/Services/FileSystemAccessServer/main.cpp +++ b/Userland/Services/FileSystemAccessServer/main.cpp @@ -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); diff --git a/Userland/Services/ImageDecoder/main.cpp b/Userland/Services/ImageDecoder/main.cpp index cab1292c0d..7af4cbacc7 100644 --- a/Userland/Services/ImageDecoder/main.cpp +++ b/Userland/Services/ImageDecoder/main.cpp @@ -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(); } diff --git a/Userland/Services/LoginServer/main.cpp b/Userland/Services/LoginServer/main.cpp index 0f7c877525..07472f42bb 100644 --- a/Userland/Services/LoginServer/main.cpp +++ b/Userland/Services/LoginServer/main.cpp @@ -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")); diff --git a/Userland/Services/LookupServer/main.cpp b/Userland/Services/LookupServer/main.cpp index bc363f2939..37a11e6cc3 100644 --- a/Userland/Services/LookupServer/main.cpp +++ b/Userland/Services/LookupServer/main.cpp @@ -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)); diff --git a/Userland/Services/NotificationServer/main.cpp b/Userland/Services/NotificationServer/main.cpp index 210b2c0ce0..8239d1e808 100644 --- a/Userland/Services/NotificationServer/main.cpp +++ b/Userland/Services/NotificationServer/main.cpp @@ -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(); } diff --git a/Userland/Services/RequestServer/main.cpp b/Userland/Services/RequestServer/main.cpp index 5f4a26b0dd..02c0474ddd 100644 --- a/Userland/Services/RequestServer/main.cpp +++ b/Userland/Services/RequestServer/main.cpp @@ -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)); diff --git a/Userland/Services/Taskbar/main.cpp b/Userland/Services/Taskbar/main.cpp index f093d6dec0..ed5135b7d3 100644 --- a/Userland/Services/Taskbar/main.cpp +++ b/Userland/Services/Taskbar/main.cpp @@ -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(); diff --git a/Userland/Services/WebContent/main.cpp b/Userland/Services/WebContent/main.cpp index d7d5782d99..ac08ecbe93 100644 --- a/Userland/Services/WebContent/main.cpp +++ b/Userland/Services/WebContent/main.cpp @@ -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")); diff --git a/Userland/Services/WebServer/main.cpp b/Userland/Services/WebServer/main.cpp index 29c9984e0a..eb032eec3b 100644 --- a/Userland/Services/WebServer/main.cpp +++ b/Userland/Services/WebServer/main.cpp @@ -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(); } diff --git a/Userland/Services/WebSocket/main.cpp b/Userland/Services/WebSocket/main.cpp index 438bba72ed..c65eada58a 100644 --- a/Userland/Services/WebSocket/main.cpp +++ b/Userland/Services/WebSocket/main.cpp @@ -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)); diff --git a/Userland/Services/WindowServer/main.cpp b/Userland/Services/WindowServer/main.cpp index 54e69c6c68..fa3dc03c1a 100644 --- a/Userland/Services/WindowServer/main.cpp +++ b/Userland/Services/WindowServer/main.cpp @@ -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 { diff --git a/Userland/Utilities/arp.cpp b/Userland/Utilities/arp.cpp index af074e4c61..bef0fad522 100644 --- a/Userland/Utilities/arp.cpp +++ b/Userland/Utilities/arp.cpp @@ -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)); diff --git a/Userland/Utilities/base64.cpp b/Userland/Utilities/base64.cpp index 190eb6558e..0febee2374 100644 --- a/Userland/Utilities/base64.cpp +++ b/Userland/Utilities/base64.cpp @@ -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)); diff --git a/Userland/Utilities/basename.cpp b/Userland/Utilities/basename.cpp index 08b842ba22..545119d2c4 100644 --- a/Userland/Utilities/basename.cpp +++ b/Userland/Utilities/basename.cpp @@ -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; diff --git a/Userland/Utilities/blockdev.cpp b/Userland/Utilities/blockdev.cpp index 06ed0549ee..f911347ac4 100644 --- a/Userland/Utilities/blockdev.cpp +++ b/Userland/Utilities/blockdev.cpp @@ -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; diff --git a/Userland/Utilities/bt.cpp b/Userland/Utilities/bt.cpp index f0cd6b7875..c0d33c3d63 100644 --- a/Userland/Utilities/bt.cpp +++ b/Userland/Utilities/bt.cpp @@ -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; diff --git a/Userland/Utilities/cat.cpp b/Userland/Utilities/cat.cpp index 4c0d5be9e8..88c4268ab3 100644 --- a/Userland/Utilities/cat.cpp +++ b/Userland/Utilities/cat.cpp @@ -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) { diff --git a/Userland/Utilities/cp.cpp b/Userland/Utilities/cp.cpp index 4c1d4ecc96..930807a77b 100644 --- a/Userland/Utilities/cp.cpp +++ b/Userland/Utilities/cp.cpp @@ -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); diff --git a/Userland/Utilities/dmesg.cpp b/Userland/Utilities/dmesg.cpp index 7877ae9288..15d33eebd5 100644 --- a/Userland/Utilities/dmesg.cpp +++ b/Userland/Utilities/dmesg.cpp @@ -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)); diff --git a/Userland/Utilities/echo.cpp b/Userland/Utilities/echo.cpp index 40b5519641..6e8850ba40 100644 --- a/Userland/Utilities/echo.cpp +++ b/Userland/Utilities/echo.cpp @@ -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; diff --git a/Userland/Utilities/id.cpp b/Userland/Utilities/id.cpp index 7bc7bb388f..97a2f40305 100644 --- a/Userland/Utilities/id.cpp +++ b/Userland/Utilities/id.cpp @@ -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'); diff --git a/Userland/Utilities/js.cpp b/Userland/Utilities/js.cpp index 22bb3675c6..26daa17e75 100644 --- a/Userland/Utilities/js.cpp +++ b/Userland/Utilities/js.cpp @@ -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; diff --git a/Userland/Utilities/keymap.cpp b/Userland/Utilities/keymap.cpp index 24974009e3..52fe2ddec8 100644 --- a/Userland/Utilities/keymap.cpp +++ b/Userland/Utilities/keymap.cpp @@ -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")); diff --git a/Userland/Utilities/logout.cpp b/Userland/Utilities/logout.cpp index b9597c32ee..bafedc4de4 100644 --- a/Userland/Utilities/logout.cpp +++ b/Userland/Utilities/logout.cpp @@ -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)); diff --git a/Userland/Utilities/lsusb.cpp b/Userland/Utilities/lsusb.cpp index eb16029a4f..5ae4e2f3f4 100644 --- a/Userland/Utilities/lsusb.cpp +++ b/Userland/Utilities/lsusb.cpp @@ -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)); diff --git a/Userland/Utilities/man.cpp b/Userland/Utilities/man.cpp index 179f1ef62f..08128c27bf 100644 --- a/Userland/Utilities/man.cpp +++ b/Userland/Utilities/man.cpp @@ -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(); diff --git a/Userland/Utilities/nproc.cpp b/Userland/Utilities/nproc.cpp index 6358078b22..e1f9f9a5fe 100644 --- a/Userland/Utilities/nproc.cpp +++ b/Userland/Utilities/nproc.cpp @@ -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(); diff --git a/Userland/Utilities/pmap.cpp b/Userland/Utilities/pmap.cpp index a558a9ab52..7d465d0fd9 100644 --- a/Userland/Utilities/pmap.cpp +++ b/Userland/Utilities/pmap.cpp @@ -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)); diff --git a/Userland/Utilities/ps.cpp b/Userland/Utilities/ps.cpp index bb214a6bee..73eca9db5b 100644 --- a/Userland/Utilities/ps.cpp +++ b/Userland/Utilities/ps.cpp @@ -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)); diff --git a/Userland/Utilities/truncate.cpp b/Userland/Utilities/truncate.cpp index 50a615fccf..4f7b1442ad 100644 --- a/Userland/Utilities/truncate.cpp +++ b/Userland/Utilities/truncate.cpp @@ -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; diff --git a/Userland/Utilities/userdel.cpp b/Userland/Utilities/userdel.cpp index 7a2c40e48d..74d939a5f3 100644 --- a/Userland/Utilities/userdel.cpp +++ b/Userland/Utilities/userdel.cpp @@ -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)); diff --git a/Userland/Utilities/usermod.cpp b/Userland/Utilities/usermod.cpp index 59504cb1ce..2b4a121407 100644 --- a/Userland/Utilities/usermod.cpp +++ b/Userland/Utilities/usermod.cpp @@ -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; diff --git a/Userland/Utilities/utmpupdate.cpp b/Userland/Utilities/utmpupdate.cpp index a0650ef016..3882b4d788 100644 --- a/Userland/Utilities/utmpupdate.cpp +++ b/Userland/Utilities/utmpupdate.cpp @@ -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)); diff --git a/Userland/Utilities/w.cpp b/Userland/Utilities/w.cpp index 5729a5246f..31c52667c3 100644 --- a/Userland/Utilities/w.cpp +++ b/Userland/Utilities/w.cpp @@ -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")); |