From 20915795a8497192132680aaff6a9009e59a4cf2 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 15 Jan 2021 12:14:42 +0100 Subject: [PATCH] Everywhere: Pledge "sendfd" in WindowServer client programs This is needed for the new way we transfer window backing stores. --- Userland/Applications/About/main.cpp | 4 ++-- Userland/Applications/Browser/main.cpp | 4 ++-- Userland/Applications/Calculator/main.cpp | 4 ++-- Userland/Applications/Calendar/main.cpp | 4 ++-- Userland/Applications/CrashReporter/main.cpp | 4 ++-- Userland/Applications/DisplaySettings/main.cpp | 4 ++-- Userland/Applications/FileManager/main.cpp | 4 ++-- Userland/Applications/FontEditor/main.cpp | 6 +++--- Userland/Applications/Help/main.cpp | 4 ++-- Userland/Applications/HexEditor/main.cpp | 4 ++-- Userland/Applications/IRCClient/main.cpp | 4 ++-- Userland/Applications/KeyboardMapper/main.cpp | 4 ++-- Userland/Applications/KeyboardSettings/main.cpp | 4 ++-- Userland/Applications/MouseSettings/main.cpp | 4 ++-- Userland/Applications/Piano/main.cpp | 4 ++-- Userland/Applications/PixelPaint/main.cpp | 4 ++-- Userland/Applications/QuickShow/main.cpp | 4 ++-- Userland/Applications/SoundPlayer/main.cpp | 6 +++--- Userland/Applications/Spreadsheet/main.cpp | 4 ++-- Userland/Applications/SystemMonitor/main.cpp | 4 ++-- Userland/Applications/Terminal/main.cpp | 4 ++-- Userland/Applications/TextEditor/main.cpp | 4 ++-- Userland/Applications/ThemeEditor/main.cpp | 4 ++-- Userland/Applications/Welcome/main.cpp | 4 ++-- Userland/Demos/CatDog/main.cpp | 2 +- Userland/Demos/Eyes/main.cpp | 4 ++-- Userland/Demos/Screensaver/Screensaver.cpp | 4 ++-- Userland/DevTools/Inspector/main.cpp | 4 ++-- Userland/DevTools/Playground/main.cpp | 6 +++--- Userland/Games/2048/main.cpp | 4 ++-- Userland/Games/Breakout/main.cpp | 2 +- Userland/Games/Chess/main.cpp | 2 +- Userland/Games/Conway/main.cpp | 4 ++-- Userland/Games/Minesweeper/main.cpp | 4 ++-- Userland/Games/Pong/main.cpp | 4 ++-- Userland/Games/Snake/main.cpp | 4 ++-- Userland/MenuApplets/Audio/main.cpp | 6 +++--- Userland/MenuApplets/ClipboardHistory/main.cpp | 4 ++-- Userland/MenuApplets/Clock/main.cpp | 4 ++-- Userland/MenuApplets/Network/main.cpp | 4 ++-- Userland/MenuApplets/ResourceGraph/main.cpp | 4 ++-- Userland/MenuApplets/UserName/main.cpp | 4 ++-- Userland/Services/ChessEngine/main.cpp | 4 ++-- Userland/Services/Clipboard/main.cpp | 6 +++--- Userland/Services/ImageDecoder/main.cpp | 4 ++-- Userland/Services/NotificationServer/main.cpp | 4 ++-- Userland/Services/SystemMenu/main.cpp | 2 +- Userland/Services/Taskbar/main.cpp | 4 ++-- Userland/Services/WebContent/main.cpp | 2 +- 49 files changed, 98 insertions(+), 98 deletions(-) diff --git a/Userland/Applications/About/main.cpp b/Userland/Applications/About/main.cpp index b7e18caee33..ffe15a2eaa4 100644 --- a/Userland/Applications/About/main.cpp +++ b/Userland/Applications/About/main.cpp @@ -33,14 +33,14 @@ int main(int argc, char** argv) { - if (pledge("stdio shared_buffer accept rpath unix cpath fattr", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept rpath unix cpath fattr", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio shared_buffer accept rpath", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept rpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/Browser/main.cpp b/Userland/Applications/Browser/main.cpp index d83b68f5f46..979bcec35bb 100644 --- a/Userland/Applications/Browser/main.cpp +++ b/Userland/Applications/Browser/main.cpp @@ -70,7 +70,7 @@ int main(int argc, char** argv) return 1; } - if (pledge("stdio shared_buffer accept unix cpath rpath wpath fattr sendfd recvfd", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept unix cpath rpath wpath fattr sendfd recvfd", nullptr) < 0) { perror("pledge"); return 1; } @@ -96,7 +96,7 @@ int main(int argc, char** argv) return 1; } - if (pledge("stdio shared_buffer accept unix cpath rpath wpath sendfd recvfd", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept unix cpath rpath wpath sendfd recvfd", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/Calculator/main.cpp b/Userland/Applications/Calculator/main.cpp index 7ff18b94bf1..c460bb4cbc9 100644 --- a/Userland/Applications/Calculator/main.cpp +++ b/Userland/Applications/Calculator/main.cpp @@ -36,14 +36,14 @@ int main(int argc, char** argv) { - if (pledge("stdio shared_buffer rpath accept unix cpath fattr", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer rpath accept unix cpath fattr", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio shared_buffer rpath accept", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer rpath accept", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/Calendar/main.cpp b/Userland/Applications/Calendar/main.cpp index aebc5c4fed4..ab6697778c6 100644 --- a/Userland/Applications/Calendar/main.cpp +++ b/Userland/Applications/Calendar/main.cpp @@ -45,14 +45,14 @@ int main(int argc, char** argv) { - if (pledge("stdio shared_buffer rpath accept unix cpath fattr", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer rpath accept unix cpath fattr", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio shared_buffer rpath accept", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer rpath accept", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/CrashReporter/main.cpp b/Userland/Applications/CrashReporter/main.cpp index 047a696ea34..eea07b2c690 100644 --- a/Userland/Applications/CrashReporter/main.cpp +++ b/Userland/Applications/CrashReporter/main.cpp @@ -73,7 +73,7 @@ static String build_backtrace(const CoreDump::Reader& coredump) int main(int argc, char** argv) { - if (pledge("stdio shared_buffer accept cpath rpath unix fattr", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept cpath rpath unix fattr", nullptr) < 0) { perror("pledge"); return 1; } @@ -105,7 +105,7 @@ int main(int argc, char** argv) auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio shared_buffer accept rpath unix", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept rpath unix", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/DisplaySettings/main.cpp b/Userland/Applications/DisplaySettings/main.cpp index 50188934702..924029c33c4 100644 --- a/Userland/Applications/DisplaySettings/main.cpp +++ b/Userland/Applications/DisplaySettings/main.cpp @@ -39,14 +39,14 @@ int main(int argc, char** argv) { - if (pledge("stdio thread shared_buffer rpath accept cpath wpath unix fattr", nullptr) < 0) { + if (pledge("stdio thread sendfd shared_buffer rpath accept cpath wpath unix fattr", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio thread shared_buffer rpath accept cpath wpath", nullptr) < 0) { + if (pledge("stdio thread sendfd shared_buffer rpath accept cpath wpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/FileManager/main.cpp b/Userland/Applications/FileManager/main.cpp index 9766876f211..9c410d7e798 100644 --- a/Userland/Applications/FileManager/main.cpp +++ b/Userland/Applications/FileManager/main.cpp @@ -80,7 +80,7 @@ static void show_properties(const String& container_dir_path, const String& path int main(int argc, char** argv) { - if (pledge("stdio thread shared_buffer accept unix cpath rpath wpath fattr proc exec sigaction", nullptr) < 0) { + if (pledge("stdio thread sendfd shared_buffer accept unix cpath rpath wpath fattr proc exec sigaction", nullptr) < 0) { perror("pledge"); return 1; } @@ -99,7 +99,7 @@ int main(int argc, char** argv) auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio thread shared_buffer accept cpath rpath wpath fattr proc exec unix", nullptr) < 0) { + if (pledge("stdio thread sendfd shared_buffer accept cpath rpath wpath fattr proc exec unix", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/FontEditor/main.cpp b/Userland/Applications/FontEditor/main.cpp index f0a72d1d29b..31e04508140 100644 --- a/Userland/Applications/FontEditor/main.cpp +++ b/Userland/Applications/FontEditor/main.cpp @@ -44,14 +44,14 @@ int main(int argc, char** argv) { - if (pledge("stdio shared_buffer thread rpath accept unix cpath wpath fattr unix", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer thread rpath accept unix cpath wpath fattr unix", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio shared_buffer thread rpath accept cpath wpath unix", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer thread rpath accept cpath wpath unix", nullptr) < 0) { perror("pledge"); return 1; } @@ -64,7 +64,7 @@ int main(int argc, char** argv) return 1; } - if (pledge("stdio shared_buffer thread rpath accept cpath wpath", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer thread rpath accept cpath wpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/Help/main.cpp b/Userland/Applications/Help/main.cpp index d5a6405fbf5..8179099fa7b 100644 --- a/Userland/Applications/Help/main.cpp +++ b/Userland/Applications/Help/main.cpp @@ -53,14 +53,14 @@ int main(int argc, char* argv[]) { - if (pledge("stdio shared_buffer accept rpath unix cpath fattr", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept rpath unix cpath fattr", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio shared_buffer accept rpath unix", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept rpath unix", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/HexEditor/main.cpp b/Userland/Applications/HexEditor/main.cpp index 65e358726ea..f9cabc4dc35 100644 --- a/Userland/Applications/HexEditor/main.cpp +++ b/Userland/Applications/HexEditor/main.cpp @@ -31,14 +31,14 @@ int main(int argc, char** argv) { - if (pledge("stdio shared_buffer accept rpath unix cpath wpath fattr thread", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept rpath unix cpath wpath fattr thread", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio shared_buffer accept rpath cpath wpath thread", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept rpath cpath wpath thread", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/IRCClient/main.cpp b/Userland/Applications/IRCClient/main.cpp index a0adf92c0d4..fc264e49434 100644 --- a/Userland/Applications/IRCClient/main.cpp +++ b/Userland/Applications/IRCClient/main.cpp @@ -33,7 +33,7 @@ int main(int argc, char** argv) { - if (pledge("stdio inet dns unix shared_buffer cpath rpath fattr wpath cpath", nullptr) < 0) { + if (pledge("stdio inet dns unix sendfd shared_buffer cpath rpath fattr wpath cpath", nullptr) < 0) { perror("pledge"); return 1; } @@ -45,7 +45,7 @@ int main(int argc, char** argv) auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio inet dns unix shared_buffer rpath wpath cpath", nullptr) < 0) { + if (pledge("stdio inet dns unix sendfd shared_buffer rpath wpath cpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/KeyboardMapper/main.cpp b/Userland/Applications/KeyboardMapper/main.cpp index 0edeef72fe9..9905fed8363 100644 --- a/Userland/Applications/KeyboardMapper/main.cpp +++ b/Userland/Applications/KeyboardMapper/main.cpp @@ -40,14 +40,14 @@ int main(int argc, char** argv) args_parser.add_positional_argument(path, "Keyboard character mapping file.", "file", Core::ArgsParser::Required::No); args_parser.parse(argc, argv); - if (pledge("stdio thread rpath accept cpath wpath shared_buffer unix fattr", nullptr) < 0) { + if (pledge("stdio thread rpath accept cpath wpath sendfd shared_buffer unix fattr", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio thread rpath accept cpath wpath shared_buffer", nullptr) < 0) { + if (pledge("stdio thread rpath accept cpath wpath sendfd shared_buffer", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/KeyboardSettings/main.cpp b/Userland/Applications/KeyboardSettings/main.cpp index 8b515d815ec..2d23c2c0169 100644 --- a/Userland/Applications/KeyboardSettings/main.cpp +++ b/Userland/Applications/KeyboardSettings/main.cpp @@ -45,7 +45,7 @@ int main(int argc, char** argv) { - if (pledge("stdio rpath accept cpath wpath shared_buffer unix fattr proc exec", nullptr) < 0) { + if (pledge("stdio rpath accept cpath wpath sendfd shared_buffer unix fattr proc exec", nullptr) < 0) { perror("pledge"); return 1; } @@ -53,7 +53,7 @@ int main(int argc, char** argv) // If there is no command line parameter go for GUI. auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio rpath accept shared_buffer proc exec", nullptr) < 0) { + if (pledge("stdio rpath accept sendfd shared_buffer proc exec", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/MouseSettings/main.cpp b/Userland/Applications/MouseSettings/main.cpp index 74b07d0b0a7..27de3ff6d96 100644 --- a/Userland/Applications/MouseSettings/main.cpp +++ b/Userland/Applications/MouseSettings/main.cpp @@ -42,14 +42,14 @@ int main(int argc, char** argv) { - if (pledge("stdio cpath rpath shared_buffer unix fattr", nullptr) < 0) { + if (pledge("stdio cpath rpath sendfd shared_buffer unix fattr", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio cpath rpath shared_buffer", nullptr) < 0) { + if (pledge("stdio cpath rpath sendfd shared_buffer", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/Piano/main.cpp b/Userland/Applications/Piano/main.cpp index dc75e2944d4..ac9cb19857c 100644 --- a/Userland/Applications/Piano/main.cpp +++ b/Userland/Applications/Piano/main.cpp @@ -44,14 +44,14 @@ int main(int argc, char** argv) { - if (pledge("stdio thread rpath accept cpath wpath shared_buffer unix fattr", nullptr) < 0) { + if (pledge("stdio thread rpath accept cpath wpath sendfd shared_buffer unix fattr", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio thread rpath accept cpath wpath shared_buffer unix", nullptr) < 0) { + if (pledge("stdio thread rpath accept cpath wpath sendfd shared_buffer unix", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/PixelPaint/main.cpp b/Userland/Applications/PixelPaint/main.cpp index 02164a52ce5..3557187b84b 100644 --- a/Userland/Applications/PixelPaint/main.cpp +++ b/Userland/Applications/PixelPaint/main.cpp @@ -53,14 +53,14 @@ int main(int argc, char** argv) { - if (pledge("stdio thread shared_buffer accept rpath unix wpath cpath fattr", nullptr) < 0) { + if (pledge("stdio thread sendfd shared_buffer accept rpath unix wpath cpath fattr", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio thread shared_buffer accept rpath wpath cpath", nullptr) < 0) { + if (pledge("stdio thread sendfd shared_buffer accept rpath wpath cpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/QuickShow/main.cpp b/Userland/Applications/QuickShow/main.cpp index 2319c24a9a9..1bb770c40b3 100644 --- a/Userland/Applications/QuickShow/main.cpp +++ b/Userland/Applications/QuickShow/main.cpp @@ -51,14 +51,14 @@ int main(int argc, char** argv) { - if (pledge("stdio shared_buffer accept cpath rpath wpath unix cpath fattr proc exec thread", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept cpath rpath wpath unix cpath fattr proc exec thread", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio shared_buffer accept cpath rpath wpath proc exec thread", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept cpath rpath wpath proc exec thread", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/SoundPlayer/main.cpp b/Userland/Applications/SoundPlayer/main.cpp index 47dbd555c89..675568ee324 100644 --- a/Userland/Applications/SoundPlayer/main.cpp +++ b/Userland/Applications/SoundPlayer/main.cpp @@ -37,14 +37,14 @@ int main(int argc, char** argv) { - if (pledge("stdio shared_buffer accept rpath thread unix cpath fattr", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept rpath thread unix cpath fattr", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio shared_buffer accept rpath thread unix", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept rpath thread unix", nullptr) < 0) { perror("pledge"); return 1; } @@ -52,7 +52,7 @@ int main(int argc, char** argv) auto audio_client = Audio::ClientConnection::construct(); audio_client->handshake(); - if (pledge("stdio shared_buffer accept rpath thread", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept rpath thread", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/Spreadsheet/main.cpp b/Userland/Applications/Spreadsheet/main.cpp index e13a89cdac3..46582e1f92e 100644 --- a/Userland/Applications/Spreadsheet/main.cpp +++ b/Userland/Applications/Spreadsheet/main.cpp @@ -41,14 +41,14 @@ int main(int argc, char* argv[]) { - if (pledge("stdio shared_buffer accept rpath unix cpath wpath fattr thread", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept rpath unix cpath wpath fattr thread", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio thread rpath accept cpath wpath shared_buffer unix", nullptr) < 0) { + if (pledge("stdio thread rpath accept cpath wpath sendfd shared_buffer unix", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/SystemMonitor/main.cpp b/Userland/Applications/SystemMonitor/main.cpp index bdf88e44d1e..2de95c9a09e 100644 --- a/Userland/Applications/SystemMonitor/main.cpp +++ b/Userland/Applications/SystemMonitor/main.cpp @@ -105,14 +105,14 @@ static bool can_access_pid(pid_t pid) int main(int argc, char** argv) { - if (pledge("stdio proc shared_buffer accept rpath exec unix cpath fattr", nullptr) < 0) { + if (pledge("stdio proc sendfd shared_buffer accept rpath exec unix cpath fattr", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio proc shared_buffer accept rpath exec", nullptr) < 0) { + if (pledge("stdio proc sendfd shared_buffer accept rpath exec", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/Terminal/main.cpp b/Userland/Applications/Terminal/main.cpp index 9267b9465f0..690c4897e3d 100644 --- a/Userland/Applications/Terminal/main.cpp +++ b/Userland/Applications/Terminal/main.cpp @@ -303,7 +303,7 @@ static RefPtr create_find_window(TerminalWidget& terminal) int main(int argc, char** argv) { - if (pledge("stdio tty rpath accept cpath wpath shared_buffer proc exec unix fattr sigaction", nullptr) < 0) { + if (pledge("stdio tty rpath accept cpath wpath sendfd shared_buffer proc exec unix fattr sigaction", nullptr) < 0) { perror("pledge"); return 1; } @@ -320,7 +320,7 @@ int main(int argc, char** argv) auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio tty rpath accept cpath wpath shared_buffer proc exec unix", nullptr) < 0) { + if (pledge("stdio tty rpath accept cpath wpath sendfd shared_buffer proc exec unix", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/TextEditor/main.cpp b/Userland/Applications/TextEditor/main.cpp index 8e9c8fdfb8e..7da7fe84e9f 100644 --- a/Userland/Applications/TextEditor/main.cpp +++ b/Userland/Applications/TextEditor/main.cpp @@ -31,14 +31,14 @@ int main(int argc, char** argv) { - if (pledge("stdio thread rpath accept cpath wpath shared_buffer unix fattr", nullptr) < 0) { + if (pledge("stdio thread rpath accept cpath wpath sendfd shared_buffer unix fattr", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio thread rpath accept cpath wpath shared_buffer unix", nullptr) < 0) { + if (pledge("stdio thread rpath accept cpath wpath sendfd shared_buffer unix", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/ThemeEditor/main.cpp b/Userland/Applications/ThemeEditor/main.cpp index d4a5936770e..cc9663501ba 100644 --- a/Userland/Applications/ThemeEditor/main.cpp +++ b/Userland/Applications/ThemeEditor/main.cpp @@ -67,14 +67,14 @@ private: int main(int argc, char** argv) { - if (pledge("stdio thread rpath accept cpath wpath shared_buffer unix fattr", nullptr) < 0) { + if (pledge("stdio thread rpath accept cpath wpath sendfd shared_buffer unix fattr", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio thread rpath accept shared_buffer", nullptr) < 0) { + if (pledge("stdio thread rpath accept sendfd shared_buffer", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/Welcome/main.cpp b/Userland/Applications/Welcome/main.cpp index 101b35fd97b..e0b0f723bf7 100644 --- a/Userland/Applications/Welcome/main.cpp +++ b/Userland/Applications/Welcome/main.cpp @@ -113,14 +113,14 @@ static Optional> parse_welcome_file(const String& path) int main(int argc, char** argv) { - if (pledge("stdio shared_buffer rpath unix cpath fattr", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer rpath unix cpath fattr", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio shared_buffer rpath", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer rpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Demos/CatDog/main.cpp b/Userland/Demos/CatDog/main.cpp index bf7e6916151..3b7587a65d3 100644 --- a/Userland/Demos/CatDog/main.cpp +++ b/Userland/Demos/CatDog/main.cpp @@ -194,7 +194,7 @@ private: int main(int argc, char** argv) { - if (pledge("stdio rpath wpath cpath shared_buffer accept unix fattr", nullptr) < 0) { + if (pledge("stdio rpath wpath cpath sendfd shared_buffer accept unix fattr", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Demos/Eyes/main.cpp b/Userland/Demos/Eyes/main.cpp index 0b2fe4ad86c..e71f5620b3b 100644 --- a/Userland/Demos/Eyes/main.cpp +++ b/Userland/Demos/Eyes/main.cpp @@ -49,14 +49,14 @@ int main(int argc, char* argv[]) args_parser.add_option(grid_columns, "Number of columns in grid (incompatible with --number)", "grid-cols", 'c', "number"); args_parser.parse(argc, argv); - if (pledge("stdio shared_buffer accept rpath unix cpath wpath fattr thread", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept rpath unix cpath wpath fattr thread", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio shared_buffer accept rpath cpath wpath thread", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept rpath cpath wpath thread", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Demos/Screensaver/Screensaver.cpp b/Userland/Demos/Screensaver/Screensaver.cpp index f1d25553a7e..026d5a12cf4 100644 --- a/Userland/Demos/Screensaver/Screensaver.cpp +++ b/Userland/Demos/Screensaver/Screensaver.cpp @@ -124,14 +124,14 @@ void Screensaver::draw() int main(int argc, char** argv) { - if (pledge("stdio rpath wpath cpath shared_buffer cpath unix fattr", nullptr) < 0) { + if (pledge("stdio rpath wpath cpath sendfd shared_buffer cpath unix fattr", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio rpath shared_buffer", nullptr) < 0) { + if (pledge("stdio rpath sendfd shared_buffer", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/DevTools/Inspector/main.cpp b/Userland/DevTools/Inspector/main.cpp index 19819b725dd..39ba89686e2 100644 --- a/Userland/DevTools/Inspector/main.cpp +++ b/Userland/DevTools/Inspector/main.cpp @@ -49,7 +49,7 @@ using namespace Inspector; int main(int argc, char** argv) { - if (pledge("stdio shared_buffer rpath accept unix cpath fattr", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer rpath accept unix cpath fattr", nullptr) < 0) { perror("pledge"); return 1; } @@ -143,7 +143,7 @@ int main(int argc, char** argv) window->show(); remote_process.update(); - if (pledge("stdio shared_buffer rpath accept unix", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer rpath accept unix", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/DevTools/Playground/main.cpp b/Userland/DevTools/Playground/main.cpp index 8ed1cdbda8c..aff7f9b5da1 100644 --- a/Userland/DevTools/Playground/main.cpp +++ b/Userland/DevTools/Playground/main.cpp @@ -258,14 +258,14 @@ private: int main(int argc, char** argv) { - if (pledge("stdio thread shared_buffer accept cpath rpath wpath unix fattr", nullptr) < 0) { + if (pledge("stdio thread sendfd shared_buffer accept cpath rpath wpath unix fattr", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio thread shared_buffer accept rpath cpath wpath unix", nullptr) < 0) { + if (pledge("stdio thread sendfd shared_buffer accept rpath cpath wpath unix", nullptr) < 0) { perror("pledge"); return 1; } @@ -278,7 +278,7 @@ int main(int argc, char** argv) return 1; } - if (pledge("stdio thread shared_buffer accept rpath cpath wpath", nullptr) < 0) { + if (pledge("stdio thread sendfd shared_buffer accept rpath cpath wpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Games/2048/main.cpp b/Userland/Games/2048/main.cpp index e7bae59139c..f1c8bdc732d 100644 --- a/Userland/Games/2048/main.cpp +++ b/Userland/Games/2048/main.cpp @@ -43,7 +43,7 @@ int main(int argc, char** argv) { - if (pledge("stdio rpath wpath cpath shared_buffer accept cpath unix fattr", nullptr) < 0) { + if (pledge("stdio rpath wpath cpath sendfd shared_buffer accept cpath unix fattr", nullptr) < 0) { perror("pledge"); return 1; } @@ -65,7 +65,7 @@ int main(int argc, char** argv) config->sync(); - if (pledge("stdio rpath shared_buffer wpath cpath accept", nullptr) < 0) { + if (pledge("stdio rpath sendfd shared_buffer wpath cpath accept", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Games/Breakout/main.cpp b/Userland/Games/Breakout/main.cpp index e4685cde40e..578bda8c83e 100644 --- a/Userland/Games/Breakout/main.cpp +++ b/Userland/Games/Breakout/main.cpp @@ -34,7 +34,7 @@ int main(int argc, char** argv) { - if (pledge("stdio rpath wpath cpath shared_buffer accept unix fattr", nullptr) < 0) { + if (pledge("stdio rpath wpath cpath sendfd shared_buffer accept unix fattr", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Games/Chess/main.cpp b/Userland/Games/Chess/main.cpp index 213d5a8a4f2..40bb75b21cf 100644 --- a/Userland/Games/Chess/main.cpp +++ b/Userland/Games/Chess/main.cpp @@ -47,7 +47,7 @@ int main(int argc, char** argv) RefPtr config = Core::ConfigFile::get_for_app("Chess"); - if (pledge("stdio rpath accept wpath cpath shared_buffer proc exec", nullptr) < 0) { + if (pledge("stdio rpath accept wpath cpath sendfd shared_buffer proc exec", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Games/Conway/main.cpp b/Userland/Games/Conway/main.cpp index ae57220f459..024296e3096 100644 --- a/Userland/Games/Conway/main.cpp +++ b/Userland/Games/Conway/main.cpp @@ -34,14 +34,14 @@ int main(int argc, char** argv) { - if (pledge("stdio rpath wpath cpath shared_buffer accept cpath unix fattr", nullptr) < 0) { + if (pledge("stdio rpath wpath cpath sendfd shared_buffer accept cpath unix fattr", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio rpath shared_buffer accept", nullptr) < 0) { + if (pledge("stdio rpath sendfd shared_buffer accept", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Games/Minesweeper/main.cpp b/Userland/Games/Minesweeper/main.cpp index b4202ed8672..dfe82f03e43 100644 --- a/Userland/Games/Minesweeper/main.cpp +++ b/Userland/Games/Minesweeper/main.cpp @@ -40,14 +40,14 @@ int main(int argc, char** argv) { - if (pledge("stdio rpath accept wpath cpath shared_buffer unix fattr", nullptr) < 0) { + if (pledge("stdio rpath accept wpath cpath sendfd shared_buffer unix fattr", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio rpath accept wpath cpath shared_buffer", nullptr) < 0) { + if (pledge("stdio rpath accept wpath cpath sendfd shared_buffer", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Games/Pong/main.cpp b/Userland/Games/Pong/main.cpp index f4b7c235f14..b6ea55ed69a 100644 --- a/Userland/Games/Pong/main.cpp +++ b/Userland/Games/Pong/main.cpp @@ -35,14 +35,14 @@ int main(int argc, char** argv) { - if (pledge("stdio rpath wpath cpath shared_buffer accept cpath unix fattr", nullptr) < 0) { + if (pledge("stdio rpath wpath cpath sendfd shared_buffer accept cpath unix fattr", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio rpath wpath cpath shared_buffer accept", nullptr) < 0) { + if (pledge("stdio rpath wpath cpath sendfd shared_buffer accept", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Games/Snake/main.cpp b/Userland/Games/Snake/main.cpp index 220f44e87ec..c9bb4d8c98d 100644 --- a/Userland/Games/Snake/main.cpp +++ b/Userland/Games/Snake/main.cpp @@ -38,14 +38,14 @@ int main(int argc, char** argv) { - if (pledge("stdio rpath wpath cpath shared_buffer accept cpath unix fattr", nullptr) < 0) { + if (pledge("stdio rpath wpath cpath sendfd shared_buffer accept cpath unix fattr", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio rpath wpath cpath shared_buffer accept", nullptr) < 0) { + if (pledge("stdio rpath wpath cpath sendfd shared_buffer accept", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/MenuApplets/Audio/main.cpp b/Userland/MenuApplets/Audio/main.cpp index ddfa3cb2d3f..5c7cc73ce36 100644 --- a/Userland/MenuApplets/Audio/main.cpp +++ b/Userland/MenuApplets/Audio/main.cpp @@ -211,14 +211,14 @@ private: int main(int argc, char** argv) { - if (pledge("stdio shared_buffer accept rpath unix cpath fattr", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept rpath unix cpath fattr", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio shared_buffer accept rpath unix", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept rpath unix", nullptr) < 0) { perror("pledge"); return 1; } @@ -239,7 +239,7 @@ int main(int argc, char** argv) unveil(nullptr, nullptr); - if (pledge("stdio shared_buffer accept rpath", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept rpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/MenuApplets/ClipboardHistory/main.cpp b/Userland/MenuApplets/ClipboardHistory/main.cpp index 00750cc8238..544ec81f5c9 100644 --- a/Userland/MenuApplets/ClipboardHistory/main.cpp +++ b/Userland/MenuApplets/ClipboardHistory/main.cpp @@ -35,14 +35,14 @@ int main(int argc, char* argv[]) { - if (pledge("stdio shared_buffer accept rpath unix cpath fattr", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept rpath unix cpath fattr", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio shared_buffer accept rpath", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept rpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/MenuApplets/Clock/main.cpp b/Userland/MenuApplets/Clock/main.cpp index 153127b3be0..84b2dd11e32 100644 --- a/Userland/MenuApplets/Clock/main.cpp +++ b/Userland/MenuApplets/Clock/main.cpp @@ -281,14 +281,14 @@ private: int main(int argc, char** argv) { - if (pledge("stdio shared_buffer accept rpath unix cpath fattr exec proc", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept rpath unix cpath fattr exec proc", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio shared_buffer accept rpath exec proc", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept rpath exec proc", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/MenuApplets/Network/main.cpp b/Userland/MenuApplets/Network/main.cpp index 79724eab8bb..afb0545886a 100644 --- a/Userland/MenuApplets/Network/main.cpp +++ b/Userland/MenuApplets/Network/main.cpp @@ -169,14 +169,14 @@ private: int main(int argc, char* argv[]) { - if (pledge("stdio shared_buffer accept rpath unix cpath fattr unix proc exec", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept rpath unix cpath fattr unix proc exec", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio shared_buffer accept rpath unix proc exec", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept rpath unix proc exec", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/MenuApplets/ResourceGraph/main.cpp b/Userland/MenuApplets/ResourceGraph/main.cpp index 6ca8157ffab..fa11b39deff 100644 --- a/Userland/MenuApplets/ResourceGraph/main.cpp +++ b/Userland/MenuApplets/ResourceGraph/main.cpp @@ -203,14 +203,14 @@ private: int main(int argc, char** argv) { - if (pledge("stdio shared_buffer accept proc exec rpath unix cpath fattr", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept proc exec rpath unix cpath fattr", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio shared_buffer accept proc exec rpath", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept proc exec rpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/MenuApplets/UserName/main.cpp b/Userland/MenuApplets/UserName/main.cpp index df4e133463a..9a3fd7eea2a 100644 --- a/Userland/MenuApplets/UserName/main.cpp +++ b/Userland/MenuApplets/UserName/main.cpp @@ -65,14 +65,14 @@ private: int main(int argc, char** argv) { - if (pledge("stdio shared_buffer rpath cpath unix fattr", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer rpath cpath unix fattr", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio shared_buffer rpath", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer rpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Services/ChessEngine/main.cpp b/Userland/Services/ChessEngine/main.cpp index 60d6ec8397a..bff85809e92 100644 --- a/Userland/Services/ChessEngine/main.cpp +++ b/Userland/Services/ChessEngine/main.cpp @@ -30,12 +30,12 @@ int main() { - if (pledge("stdio shared_buffer accept unix rpath cpath fattr", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept unix rpath cpath fattr", nullptr) < 0) { perror("pledge"); return 1; } Core::EventLoop loop; - if (pledge("stdio shared_buffer unix", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer unix", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Services/Clipboard/main.cpp b/Userland/Services/Clipboard/main.cpp index b6cae095ee7..e5380abcf0d 100644 --- a/Userland/Services/Clipboard/main.cpp +++ b/Userland/Services/Clipboard/main.cpp @@ -32,12 +32,12 @@ int main(int, char**) { - if (pledge("stdio shared_buffer accept unix rpath cpath fattr", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept unix rpath cpath fattr", nullptr) < 0) { perror("pledge"); return 1; } Core::EventLoop event_loop; - if (pledge("stdio shared_buffer unix accept", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer unix accept", nullptr) < 0) { perror("pledge"); return 1; } @@ -50,7 +50,7 @@ int main(int, char**) bool ok = server->take_over_from_system_server(); ASSERT(ok); - if (pledge("stdio shared_buffer accept", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Services/ImageDecoder/main.cpp b/Userland/Services/ImageDecoder/main.cpp index d370f0d00be..0e2bff77539 100644 --- a/Userland/Services/ImageDecoder/main.cpp +++ b/Userland/Services/ImageDecoder/main.cpp @@ -32,7 +32,7 @@ int main(int, char**) { Core::EventLoop event_loop; - if (pledge("stdio shared_buffer unix", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer unix", nullptr) < 0) { perror("pledge"); return 1; } @@ -43,7 +43,7 @@ int main(int, char**) auto socket = Core::LocalSocket::take_over_accepted_socket_from_system_server(); IPC::new_client_connection(socket.release_nonnull(), 1); - if (pledge("stdio shared_buffer", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Services/NotificationServer/main.cpp b/Userland/Services/NotificationServer/main.cpp index 91cd06e0d7b..7661c3ba8ee 100644 --- a/Userland/Services/NotificationServer/main.cpp +++ b/Userland/Services/NotificationServer/main.cpp @@ -35,7 +35,7 @@ int main(int argc, char** argv) { - if (pledge("stdio shared_buffer accept rpath wpath cpath unix fattr", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept rpath wpath cpath unix fattr", nullptr) < 0) { perror("pledge"); return 1; } @@ -63,7 +63,7 @@ int main(int argc, char** argv) unveil(nullptr, nullptr); - if (pledge("stdio shared_buffer accept rpath", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept rpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Services/SystemMenu/main.cpp b/Userland/Services/SystemMenu/main.cpp index af532ee4cfb..7181b39095a 100644 --- a/Userland/Services/SystemMenu/main.cpp +++ b/Userland/Services/SystemMenu/main.cpp @@ -75,7 +75,7 @@ int main(int argc, char** argv) GUI::WindowServerConnection::the().send_sync(menu->menu_id()); - if (pledge("stdio shared_buffer accept rpath proc exec", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept rpath proc exec", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Services/Taskbar/main.cpp b/Userland/Services/Taskbar/main.cpp index 39172854979..eb49b1cc24f 100644 --- a/Userland/Services/Taskbar/main.cpp +++ b/Userland/Services/Taskbar/main.cpp @@ -33,7 +33,7 @@ int main(int argc, char** argv) { - if (pledge("stdio shared_buffer accept proc exec rpath unix cpath fattr sigaction", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept proc exec rpath unix cpath fattr sigaction", nullptr) < 0) { perror("pledge"); return 1; } @@ -45,7 +45,7 @@ int main(int argc, char** argv) ; }); - if (pledge("stdio shared_buffer accept proc exec rpath", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept proc exec rpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Services/WebContent/main.cpp b/Userland/Services/WebContent/main.cpp index 5367f2cce3f..20b6f8daa00 100644 --- a/Userland/Services/WebContent/main.cpp +++ b/Userland/Services/WebContent/main.cpp @@ -32,7 +32,7 @@ int main(int, char**) { Core::EventLoop event_loop; - if (pledge("stdio shared_buffer accept unix rpath recvfd", nullptr) < 0) { + if (pledge("stdio sendfd shared_buffer accept unix rpath recvfd", nullptr) < 0) { perror("pledge"); return 1; }