diff --git a/Userland/Applets/Audio/main.cpp b/Userland/Applets/Audio/main.cpp index c6eea08a010..a39651c6519 100644 --- a/Userland/Applets/Audio/main.cpp +++ b/Userland/Applets/Audio/main.cpp @@ -195,18 +195,13 @@ private: int main(int argc, char** argv) { - if (pledge("stdio recvfd sendfd accept rpath unix cpath fattr", nullptr) < 0) { + if (pledge("stdio recvfd sendfd rpath unix", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio recvfd sendfd accept rpath unix", nullptr) < 0) { - perror("pledge"); - return 1; - } - auto window = GUI::Window::construct(); window->set_has_alpha_channel(true); window->set_title("Audio"); @@ -223,7 +218,7 @@ int main(int argc, char** argv) unveil(nullptr, nullptr); - if (pledge("stdio recvfd sendfd accept rpath", nullptr) < 0) { + if (pledge("stdio recvfd sendfd rpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applets/ClipboardHistory/main.cpp b/Userland/Applets/ClipboardHistory/main.cpp index b438ff06751..ba73c559c27 100644 --- a/Userland/Applets/ClipboardHistory/main.cpp +++ b/Userland/Applets/ClipboardHistory/main.cpp @@ -16,14 +16,14 @@ int main(int argc, char* argv[]) { - if (pledge("stdio recvfd sendfd accept rpath unix cpath fattr", nullptr) < 0) { + if (pledge("stdio recvfd sendfd rpath unix", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio recvfd sendfd accept rpath", nullptr) < 0) { + if (pledge("stdio recvfd sendfd rpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applets/Network/main.cpp b/Userland/Applets/Network/main.cpp index 81c4954ef24..de949eaed59 100644 --- a/Userland/Applets/Network/main.cpp +++ b/Userland/Applets/Network/main.cpp @@ -149,18 +149,13 @@ private: int main(int argc, char* argv[]) { - if (pledge("stdio recvfd sendfd accept rpath unix cpath fattr unix proc exec", nullptr) < 0) { + if (pledge("stdio recvfd sendfd rpath unix proc exec", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio recvfd sendfd accept rpath unix proc exec", nullptr) < 0) { - perror("pledge"); - return 1; - } - if (unveil("/res", "r") < 0) { perror("unveil"); return 1; diff --git a/Userland/Applets/ResourceGraph/main.cpp b/Userland/Applets/ResourceGraph/main.cpp index 6bf437d5e94..ec2844f9e6d 100644 --- a/Userland/Applets/ResourceGraph/main.cpp +++ b/Userland/Applets/ResourceGraph/main.cpp @@ -183,14 +183,14 @@ private: int main(int argc, char** argv) { - if (pledge("stdio recvfd sendfd accept proc exec rpath unix cpath fattr", nullptr) < 0) { + if (pledge("stdio recvfd sendfd proc exec rpath unix", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio recvfd sendfd accept proc exec rpath", nullptr) < 0) { + if (pledge("stdio recvfd sendfd proc exec rpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/About/main.cpp b/Userland/Applications/About/main.cpp index 18b29512185..10744cd4ec3 100644 --- a/Userland/Applications/About/main.cpp +++ b/Userland/Applications/About/main.cpp @@ -13,14 +13,14 @@ int main(int argc, char** argv) { - if (pledge("stdio recvfd sendfd accept rpath unix cpath fattr", nullptr) < 0) { + if (pledge("stdio recvfd sendfd rpath unix", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio recvfd sendfd accept rpath", nullptr) < 0) { + if (pledge("stdio recvfd sendfd rpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/Browser/main.cpp b/Userland/Applications/Browser/main.cpp index f9a765d235e..5329ff9d441 100644 --- a/Userland/Applications/Browser/main.cpp +++ b/Userland/Applications/Browser/main.cpp @@ -53,7 +53,7 @@ int main(int argc, char** argv) return 1; } - if (pledge("stdio recvfd sendfd accept unix cpath rpath wpath fattr", nullptr) < 0) { + if (pledge("stdio recvfd sendfd unix cpath rpath wpath", nullptr) < 0) { perror("pledge"); return 1; } @@ -80,11 +80,6 @@ int main(int argc, char** argv) return 1; } - if (pledge("stdio recvfd sendfd accept unix cpath rpath wpath", nullptr) < 0) { - perror("pledge"); - return 1; - } - if (unveil("/home", "rwc") < 0) { perror("unveil"); return 1; diff --git a/Userland/Applications/Calculator/main.cpp b/Userland/Applications/Calculator/main.cpp index 1bf55d49a29..deaef5d0cdb 100644 --- a/Userland/Applications/Calculator/main.cpp +++ b/Userland/Applications/Calculator/main.cpp @@ -18,14 +18,14 @@ int main(int argc, char** argv) { - if (pledge("stdio recvfd sendfd rpath accept unix cpath fattr", nullptr) < 0) { + if (pledge("stdio recvfd sendfd rpath unix", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio recvfd sendfd rpath accept", nullptr) < 0) { + if (pledge("stdio recvfd sendfd rpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/Calendar/main.cpp b/Userland/Applications/Calendar/main.cpp index 19abd6d3843..3d0a2885b12 100644 --- a/Userland/Applications/Calendar/main.cpp +++ b/Userland/Applications/Calendar/main.cpp @@ -22,14 +22,14 @@ int main(int argc, char** argv) { - if (pledge("stdio recvfd sendfd rpath accept unix cpath fattr", nullptr) < 0) { + if (pledge("stdio recvfd sendfd rpath unix", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio recvfd sendfd rpath accept", nullptr) < 0) { + if (pledge("stdio recvfd sendfd rpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/CrashReporter/main.cpp b/Userland/Applications/CrashReporter/main.cpp index 4cf1bcfb934..b0f2b857c9a 100644 --- a/Userland/Applications/CrashReporter/main.cpp +++ b/Userland/Applications/CrashReporter/main.cpp @@ -101,7 +101,7 @@ static TitleAndText build_cpu_registers(const ELF::Core::ThreadInfo& thread_info int main(int argc, char** argv) { - if (pledge("stdio recvfd sendfd accept cpath rpath unix fattr", nullptr) < 0) { + if (pledge("stdio recvfd sendfd cpath rpath unix", nullptr) < 0) { perror("pledge"); return 1; } @@ -153,7 +153,7 @@ int main(int argc, char** argv) auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio recvfd sendfd accept rpath unix", nullptr) < 0) { + if (pledge("stdio recvfd sendfd rpath unix", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/Debugger/main.cpp b/Userland/Applications/Debugger/main.cpp index 0f4976d0f94..42f30e3ac80 100644 --- a/Userland/Applications/Debugger/main.cpp +++ b/Userland/Applications/Debugger/main.cpp @@ -172,7 +172,7 @@ int main(int argc, char** argv) { editor = Line::Editor::construct(); - if (pledge("stdio proc ptrace exec rpath tty sigaction cpath unix fattr", nullptr) < 0) { + if (pledge("stdio proc ptrace exec rpath tty sigaction cpath unix", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/DisplaySettings/main.cpp b/Userland/Applications/DisplaySettings/main.cpp index 66e0df75541..944131d13f7 100644 --- a/Userland/Applications/DisplaySettings/main.cpp +++ b/Userland/Applications/DisplaySettings/main.cpp @@ -19,14 +19,14 @@ int main(int argc, char** argv) { - if (pledge("stdio thread recvfd sendfd rpath accept cpath wpath unix fattr", nullptr) < 0) { + if (pledge("stdio thread recvfd sendfd rpath cpath wpath unix", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio thread recvfd sendfd rpath accept cpath wpath", nullptr) < 0) { + if (pledge("stdio thread recvfd sendfd rpath cpath wpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/FileManager/main.cpp b/Userland/Applications/FileManager/main.cpp index 4ef81013583..99489f425f7 100644 --- a/Userland/Applications/FileManager/main.cpp +++ b/Userland/Applications/FileManager/main.cpp @@ -65,7 +65,7 @@ static bool add_launch_handler_actions_to_menu(RefPtr& menu, const Di int main(int argc, char** argv) { - if (pledge("stdio thread recvfd sendfd accept unix cpath rpath wpath fattr proc exec sigaction", nullptr) < 0) { + if (pledge("stdio thread recvfd sendfd unix cpath rpath wpath fattr proc exec sigaction", nullptr) < 0) { perror("pledge"); return 1; } @@ -93,7 +93,7 @@ int main(int argc, char** argv) auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio thread recvfd sendfd accept cpath rpath wpath fattr proc exec unix", nullptr) < 0) { + if (pledge("stdio thread recvfd sendfd 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 8318eb4d96f..f5024b757bf 100644 --- a/Userland/Applications/FontEditor/main.cpp +++ b/Userland/Applications/FontEditor/main.cpp @@ -20,14 +20,14 @@ int main(int argc, char** argv) { - if (pledge("stdio recvfd sendfd thread rpath accept unix cpath wpath fattr unix", nullptr) < 0) { + if (pledge("stdio recvfd sendfd thread rpath unix cpath wpath", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio recvfd sendfd thread rpath accept cpath wpath unix", nullptr) < 0) { + if (pledge("stdio recvfd sendfd thread rpath cpath wpath", nullptr) < 0) { perror("pledge"); return 1; } @@ -40,7 +40,7 @@ int main(int argc, char** argv) return 1; } - if (pledge("stdio recvfd sendfd thread rpath accept cpath wpath", nullptr) < 0) { + if (pledge("stdio recvfd sendfd thread rpath cpath wpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/Help/main.cpp b/Userland/Applications/Help/main.cpp index a3d01ba6bfa..9a7f8fdaef0 100644 --- a/Userland/Applications/Help/main.cpp +++ b/Userland/Applications/Help/main.cpp @@ -36,18 +36,13 @@ int main(int argc, char* argv[]) { - if (pledge("stdio recvfd sendfd accept rpath unix cpath fattr", nullptr) < 0) { + if (pledge("stdio recvfd sendfd rpath unix", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio recvfd sendfd accept rpath unix", nullptr) < 0) { - perror("pledge"); - return 1; - } - if (unveil("/res", "r") < 0) { perror("unveil"); return 1; diff --git a/Userland/Applications/HexEditor/main.cpp b/Userland/Applications/HexEditor/main.cpp index a348a482dc5..dba2119f8f2 100644 --- a/Userland/Applications/HexEditor/main.cpp +++ b/Userland/Applications/HexEditor/main.cpp @@ -13,14 +13,14 @@ int main(int argc, char** argv) { - if (pledge("stdio recvfd sendfd accept rpath unix cpath wpath fattr thread", nullptr) < 0) { + if (pledge("stdio recvfd sendfd rpath unix cpath wpath thread", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio recvfd sendfd accept rpath cpath wpath thread", nullptr) < 0) { + if (pledge("stdio recvfd sendfd 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 64c20e3c712..1249632f0df 100644 --- a/Userland/Applications/IRCClient/main.cpp +++ b/Userland/Applications/IRCClient/main.cpp @@ -14,7 +14,7 @@ int main(int argc, char** argv) { - if (pledge("stdio inet unix recvfd sendfd cpath rpath fattr wpath cpath", nullptr) < 0) { + if (pledge("stdio inet unix recvfd sendfd cpath rpath wpath", nullptr) < 0) { perror("pledge"); return 1; } @@ -26,11 +26,6 @@ int main(int argc, char** argv) auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio inet unix recvfd sendfd rpath wpath cpath", nullptr) < 0) { - perror("pledge"); - return 1; - } - if (unveil("/tmp/portal/lookup", "rw") < 0) { perror("unveil"); return 1; diff --git a/Userland/Applications/KeyboardMapper/main.cpp b/Userland/Applications/KeyboardMapper/main.cpp index b36964c61a7..b87efa5e3ba 100644 --- a/Userland/Applications/KeyboardMapper/main.cpp +++ b/Userland/Applications/KeyboardMapper/main.cpp @@ -21,14 +21,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 getkeymap thread rpath accept cpath wpath recvfd sendfd unix fattr", nullptr) < 0) { + if (pledge("stdio getkeymap thread rpath cpath wpath recvfd sendfd unix", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio getkeymap thread rpath accept cpath wpath recvfd sendfd", nullptr) < 0) { + if (pledge("stdio getkeymap thread rpath cpath wpath recvfd sendfd", nullptr) < 0) { perror("pledge"); return 1; } @@ -50,7 +50,7 @@ int main(int argc, char** argv) keyboard_mapper_widget->load_from_system(); } - if (pledge("stdio thread rpath accept cpath wpath recvfd sendfd", nullptr) < 0) { + if (pledge("stdio thread rpath cpath wpath recvfd sendfd", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/KeyboardSettings/main.cpp b/Userland/Applications/KeyboardSettings/main.cpp index 83a6ce297d2..96aa4437010 100644 --- a/Userland/Applications/KeyboardSettings/main.cpp +++ b/Userland/Applications/KeyboardSettings/main.cpp @@ -25,7 +25,7 @@ int main(int argc, char** argv) { - if (pledge("stdio rpath accept cpath wpath recvfd sendfd unix fattr proc exec", nullptr) < 0) { + if (pledge("stdio rpath cpath wpath recvfd sendfd unix proc exec", nullptr) < 0) { perror("pledge"); return 1; } @@ -33,7 +33,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 recvfd sendfd proc exec", nullptr) < 0) { + if (pledge("stdio rpath recvfd sendfd proc exec", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/Magnifier/main.cpp b/Userland/Applications/Magnifier/main.cpp index 6b227bb6ed5..00d8c3934fe 100644 --- a/Userland/Applications/Magnifier/main.cpp +++ b/Userland/Applications/Magnifier/main.cpp @@ -15,7 +15,7 @@ int main(int argc, char** argv) { - if (pledge("stdio cpath rpath recvfd sendfd unix fattr", nullptr) < 0) { + if (pledge("stdio cpath rpath recvfd sendfd unix", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/MouseSettings/main.cpp b/Userland/Applications/MouseSettings/main.cpp index ffea258b4d8..9ed2b4ffd86 100644 --- a/Userland/Applications/MouseSettings/main.cpp +++ b/Userland/Applications/MouseSettings/main.cpp @@ -15,7 +15,7 @@ int main(int argc, char** argv) { - if (pledge("stdio cpath rpath recvfd sendfd unix fattr", nullptr) < 0) { + if (pledge("stdio cpath rpath recvfd sendfd unix", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/Piano/main.cpp b/Userland/Applications/Piano/main.cpp index a584d2331f5..76643e60db0 100644 --- a/Userland/Applications/Piano/main.cpp +++ b/Userland/Applications/Piano/main.cpp @@ -25,18 +25,13 @@ int main(int argc, char** argv) { - if (pledge("stdio thread rpath accept cpath wpath recvfd sendfd unix fattr", nullptr) < 0) { + if (pledge("stdio thread rpath cpath wpath recvfd sendfd unix", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio thread rpath accept cpath wpath recvfd sendfd unix", nullptr) < 0) { - perror("pledge"); - return 1; - } - auto audio_client = Audio::ClientConnection::construct(); audio_client->handshake(); diff --git a/Userland/Applications/PixelPaint/main.cpp b/Userland/Applications/PixelPaint/main.cpp index b5d592977ef..fd1eb724585 100644 --- a/Userland/Applications/PixelPaint/main.cpp +++ b/Userland/Applications/PixelPaint/main.cpp @@ -34,14 +34,14 @@ int main(int argc, char** argv) { - if (pledge("stdio thread recvfd sendfd accept rpath unix wpath cpath fattr", nullptr) < 0) { + if (pledge("stdio thread recvfd sendfd rpath unix wpath cpath", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio thread recvfd sendfd accept rpath wpath cpath", nullptr) < 0) { + if (pledge("stdio thread recvfd sendfd rpath wpath cpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/QuickShow/main.cpp b/Userland/Applications/QuickShow/main.cpp index 95e1cfbec30..0532d2c980f 100644 --- a/Userland/Applications/QuickShow/main.cpp +++ b/Userland/Applications/QuickShow/main.cpp @@ -31,18 +31,13 @@ int main(int argc, char** argv) { - if (pledge("stdio recvfd sendfd accept rpath wpath cpath unix fattr thread", nullptr) < 0) { + if (pledge("stdio recvfd sendfd rpath wpath cpath unix thread", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio recvfd sendfd accept cpath rpath wpath unix thread", nullptr) < 0) { - perror("pledge"); - return 1; - } - if (!Desktop::Launcher::add_allowed_handler_with_any_url("/bin/QuickShow")) { warnln("Failed to set up allowed launch URLs"); return 1; diff --git a/Userland/Applications/Run/main.cpp b/Userland/Applications/Run/main.cpp index 7b9eb149a02..b15a6ccf73b 100644 --- a/Userland/Applications/Run/main.cpp +++ b/Userland/Applications/Run/main.cpp @@ -12,18 +12,12 @@ int main(int argc, char** argv) { - if (pledge("stdio recvfd sendfd thread accept cpath rpath wpath unix fattr proc exec", nullptr) < 0) { + if (pledge("stdio recvfd sendfd thread cpath rpath wpath unix proc exec", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - - if (pledge("stdio recvfd sendfd thread accept cpath rpath wpath unix proc exec", nullptr) < 0) { - perror("pledge"); - return 1; - } - auto window = RunWindow::construct(); window->move_to(12, GUI::Desktop::the().rect().bottom() - GUI::Desktop::the().taskbar_height() - 12 - window->height()); diff --git a/Userland/Applications/SoundPlayer/main.cpp b/Userland/Applications/SoundPlayer/main.cpp index e4f56f133df..56f17741f37 100644 --- a/Userland/Applications/SoundPlayer/main.cpp +++ b/Userland/Applications/SoundPlayer/main.cpp @@ -20,22 +20,16 @@ int main(int argc, char** argv) { - if (pledge("stdio recvfd sendfd accept rpath thread unix cpath fattr", nullptr) < 0) { + if (pledge("stdio recvfd sendfd rpath thread unix", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - - if (pledge("stdio recvfd sendfd accept rpath thread unix", nullptr) < 0) { - perror("pledge"); - return 1; - } - auto audio_client = Audio::ClientConnection::construct(); audio_client->handshake(); - if (pledge("stdio recvfd sendfd accept rpath thread", nullptr) < 0) { + if (pledge("stdio recvfd sendfd rpath thread", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/Spreadsheet/main.cpp b/Userland/Applications/Spreadsheet/main.cpp index b92e05241b9..7fff03a61b2 100644 --- a/Userland/Applications/Spreadsheet/main.cpp +++ b/Userland/Applications/Spreadsheet/main.cpp @@ -22,14 +22,14 @@ int main(int argc, char* argv[]) { - if (pledge("stdio recvfd sendfd accept rpath unix cpath wpath fattr thread", nullptr) < 0) { + if (pledge("stdio recvfd sendfd rpath unix cpath wpath thread", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio recvfd sendfd thread rpath accept cpath wpath fattr unix", nullptr) < 0) { + if (pledge("stdio recvfd sendfd thread rpath cpath wpath unix", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/SystemMonitor/main.cpp b/Userland/Applications/SystemMonitor/main.cpp index 9bc205c7909..00a43feec4c 100644 --- a/Userland/Applications/SystemMonitor/main.cpp +++ b/Userland/Applications/SystemMonitor/main.cpp @@ -103,18 +103,13 @@ int main(int argc, char** argv) sched_setparam(0, ¶m); } - if (pledge("stdio proc recvfd sendfd accept rpath exec unix cpath fattr", nullptr) < 0) { + if (pledge("stdio proc recvfd sendfd rpath exec unix", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio proc recvfd sendfd accept rpath exec unix", nullptr) < 0) { - perror("pledge"); - return 1; - } - if (unveil("/etc/passwd", "r") < 0) { perror("unveil"); return 1; diff --git a/Userland/Applications/Terminal/main.cpp b/Userland/Applications/Terminal/main.cpp index 191a0ada893..c8c14bd923f 100644 --- a/Userland/Applications/Terminal/main.cpp +++ b/Userland/Applications/Terminal/main.cpp @@ -229,7 +229,7 @@ static RefPtr create_find_window(VT::TerminalWidget& terminal) int main(int argc, char** argv) { - if (pledge("stdio tty rpath accept cpath wpath recvfd sendfd proc exec unix fattr sigaction", nullptr) < 0) { + if (pledge("stdio tty rpath cpath wpath recvfd sendfd proc exec unix sigaction", nullptr) < 0) { perror("pledge"); return 1; } @@ -246,7 +246,7 @@ int main(int argc, char** argv) auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio tty rpath accept cpath wpath recvfd sendfd proc exec unix", nullptr) < 0) { + if (pledge("stdio tty rpath cpath wpath recvfd sendfd proc exec unix", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/TextEditor/main.cpp b/Userland/Applications/TextEditor/main.cpp index 247f9ac4fd1..ad1a56b313d 100644 --- a/Userland/Applications/TextEditor/main.cpp +++ b/Userland/Applications/TextEditor/main.cpp @@ -15,18 +15,13 @@ using namespace TextEditor; int main(int argc, char** argv) { - if (pledge("stdio recvfd sendfd thread rpath accept cpath wpath unix fattr", nullptr) < 0) { + if (pledge("stdio recvfd sendfd thread rpath cpath wpath unix", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio recvfd sendfd thread rpath accept cpath wpath unix", nullptr) < 0) { - perror("pledge"); - return 1; - } - const char* preview_mode = "auto"; const char* file_to_edit = nullptr; Core::ArgsParser parser; diff --git a/Userland/Applications/ThemeEditor/main.cpp b/Userland/Applications/ThemeEditor/main.cpp index f86bc10939f..3ac6c445889 100644 --- a/Userland/Applications/ThemeEditor/main.cpp +++ b/Userland/Applications/ThemeEditor/main.cpp @@ -47,14 +47,14 @@ private: int main(int argc, char** argv) { - if (pledge("stdio recvfd sendfd thread rpath accept cpath wpath unix fattr", nullptr) < 0) { + if (pledge("stdio recvfd sendfd thread rpath cpath wpath unix", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio recvfd sendfd thread rpath accept", nullptr) < 0) { + if (pledge("stdio recvfd sendfd thread rpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Applications/Welcome/main.cpp b/Userland/Applications/Welcome/main.cpp index ecc6a11eb25..e689fd7c508 100644 --- a/Userland/Applications/Welcome/main.cpp +++ b/Userland/Applications/Welcome/main.cpp @@ -12,18 +12,13 @@ int main(int argc, char** argv) { - if (pledge("stdio recvfd sendfd rpath unix proc accept exec fattr", nullptr) < 0) { + if (pledge("stdio recvfd sendfd rpath unix proc exec", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio recvfd sendfd rpath unix proc accept exec", nullptr) < 0) { - perror("pledge"); - return 1; - } - if (unveil("/res", "r") < 0) { perror("unveil"); return 1; diff --git a/Userland/Demos/CatDog/main.cpp b/Userland/Demos/CatDog/main.cpp index 55673178371..bd1532403f6 100644 --- a/Userland/Demos/CatDog/main.cpp +++ b/Userland/Demos/CatDog/main.cpp @@ -17,7 +17,7 @@ int main(int argc, char** argv) { - if (pledge("stdio recvfd sendfd rpath wpath cpath accept unix fattr", nullptr) < 0) { + if (pledge("stdio recvfd sendfd rpath wpath cpath unix", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Demos/Eyes/main.cpp b/Userland/Demos/Eyes/main.cpp index f54ada300a2..816ebbde9f1 100644 --- a/Userland/Demos/Eyes/main.cpp +++ b/Userland/Demos/Eyes/main.cpp @@ -30,14 +30,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 recvfd sendfd accept rpath unix cpath wpath fattr thread", nullptr) < 0) { + if (pledge("stdio recvfd sendfd rpath unix cpath wpath thread", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio recvfd sendfd accept rpath cpath wpath thread", nullptr) < 0) { + if (pledge("stdio recvfd sendfd 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 959a432eea2..71744c972e4 100644 --- a/Userland/Demos/Screensaver/Screensaver.cpp +++ b/Userland/Demos/Screensaver/Screensaver.cpp @@ -112,7 +112,7 @@ void Screensaver::draw() int main(int argc, char** argv) { - if (pledge("stdio rpath wpath cpath recvfd sendfd cpath unix fattr", nullptr) < 0) { + if (pledge("stdio rpath recvfd sendfd unix", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Demos/Starfield/Starfield.cpp b/Userland/Demos/Starfield/Starfield.cpp index 63792196b1a..88e250e6658 100644 --- a/Userland/Demos/Starfield/Starfield.cpp +++ b/Userland/Demos/Starfield/Starfield.cpp @@ -129,7 +129,7 @@ void Starfield::draw() int main(int argc, char** argv) { - if (pledge("stdio recvfd sendfd rpath wpath cpath accept unix fattr", nullptr) < 0) { + if (pledge("stdio recvfd sendfd rpath unix", nullptr) < 0) { perror("pledge"); return 1; } @@ -151,6 +151,11 @@ int main(int argc, char** argv) auto app = GUI::Application::construct(argc, argv); + if (pledge("stdio recvfd sendfd rpath", nullptr) < 0) { + perror("pledge"); + return 1; + } + auto app_icon = GUI::Icon::default_icon("app-screensaver"); auto window = GUI::Window::construct(); diff --git a/Userland/Demos/WidgetGallery/main.cpp b/Userland/Demos/WidgetGallery/main.cpp index eb0acb76d8d..2a8f71e7856 100644 --- a/Userland/Demos/WidgetGallery/main.cpp +++ b/Userland/Demos/WidgetGallery/main.cpp @@ -15,14 +15,14 @@ int main(int argc, char** argv) { - if (pledge("stdio recvfd sendfd rpath accept unix fattr", nullptr) < 0) { + if (pledge("stdio recvfd sendfd rpath unix", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio recvfd sendfd rpath accept", nullptr) < 0) { + if (pledge("stdio recvfd sendfd rpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/DevTools/HackStudio/main.cpp b/Userland/DevTools/HackStudio/main.cpp index cea0bda219a..8efdd5f0be6 100644 --- a/Userland/DevTools/HackStudio/main.cpp +++ b/Userland/DevTools/HackStudio/main.cpp @@ -40,18 +40,13 @@ static void update_path_environment_variable(); int main(int argc, char** argv) { - if (pledge("stdio recvfd sendfd tty accept rpath cpath wpath proc exec unix fattr thread unix ptrace", nullptr) < 0) { + if (pledge("stdio recvfd sendfd tty rpath cpath wpath proc exec unix thread ptrace", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio recvfd sendfd tty accept rpath cpath wpath proc exec fattr thread unix ptrace", nullptr) < 0) { - perror("pledge"); - return 1; - } - s_window = GUI::Window::construct(); s_window->resize(840, 600); s_window->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-hack-studio.png")); diff --git a/Userland/DevTools/Inspector/main.cpp b/Userland/DevTools/Inspector/main.cpp index d3c7962036d..c1274143d3d 100644 --- a/Userland/DevTools/Inspector/main.cpp +++ b/Userland/DevTools/Inspector/main.cpp @@ -34,7 +34,7 @@ using namespace Inspector; int main(int argc, char** argv) { - if (pledge("stdio recvfd sendfd rpath accept unix cpath fattr", nullptr) < 0) { + if (pledge("stdio recvfd sendfd rpath unix", nullptr) < 0) { perror("pledge"); return 1; } @@ -179,7 +179,7 @@ int main(int argc, char** argv) window->show(); remote_process.update(); - if (pledge("stdio recvfd sendfd rpath accept unix", nullptr) < 0) { + if (pledge("stdio recvfd sendfd rpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/DevTools/Playground/main.cpp b/Userland/DevTools/Playground/main.cpp index 010e2f2f08f..d2b3d319d97 100644 --- a/Userland/DevTools/Playground/main.cpp +++ b/Userland/DevTools/Playground/main.cpp @@ -58,14 +58,14 @@ void UnregisteredWidget::paint_event(GUI::PaintEvent& event) int main(int argc, char** argv) { - if (pledge("stdio thread recvfd sendfd accept cpath rpath wpath unix fattr", nullptr) < 0) { + if (pledge("stdio thread recvfd sendfd cpath rpath wpath unix", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio thread recvfd sendfd accept rpath cpath wpath unix", nullptr) < 0) { + if (pledge("stdio thread recvfd sendfd rpath cpath wpath unix", nullptr) < 0) { perror("pledge"); return 1; } @@ -78,7 +78,7 @@ int main(int argc, char** argv) return 1; } - if (pledge("stdio thread recvfd sendfd accept rpath cpath wpath", nullptr) < 0) { + if (pledge("stdio thread recvfd sendfd rpath cpath wpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Games/2048/main.cpp b/Userland/Games/2048/main.cpp index 590bca285c1..5ffb7c1f30f 100644 --- a/Userland/Games/2048/main.cpp +++ b/Userland/Games/2048/main.cpp @@ -24,7 +24,7 @@ int main(int argc, char** argv) { - if (pledge("stdio rpath wpath cpath recvfd sendfd accept cpath unix fattr", nullptr) < 0) { + if (pledge("stdio rpath wpath cpath recvfd sendfd unix", nullptr) < 0) { perror("pledge"); return 1; } @@ -46,7 +46,7 @@ int main(int argc, char** argv) config->sync(); - if (pledge("stdio rpath recvfd sendfd wpath cpath accept", nullptr) < 0) { + if (pledge("stdio rpath recvfd sendfd wpath cpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Games/Breakout/main.cpp b/Userland/Games/Breakout/main.cpp index 38e3cbf9fc8..cd1f6cd6f81 100644 --- a/Userland/Games/Breakout/main.cpp +++ b/Userland/Games/Breakout/main.cpp @@ -15,7 +15,7 @@ int main(int argc, char** argv) { - if (pledge("stdio recvfd sendfd rpath wpath cpath accept unix fattr", nullptr) < 0) { + if (pledge("stdio recvfd sendfd rpath unix", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Games/Chess/main.cpp b/Userland/Games/Chess/main.cpp index 54204958086..ada369fb992 100644 --- a/Userland/Games/Chess/main.cpp +++ b/Userland/Games/Chess/main.cpp @@ -28,7 +28,7 @@ int main(int argc, char** argv) RefPtr config = Core::ConfigFile::get_for_app("Chess"); - if (pledge("stdio rpath accept wpath cpath recvfd sendfd thread proc exec", nullptr) < 0) { + if (pledge("stdio rpath wpath cpath recvfd sendfd thread proc exec", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Games/Conway/main.cpp b/Userland/Games/Conway/main.cpp index 77d84c8382d..dc4325dfc77 100644 --- a/Userland/Games/Conway/main.cpp +++ b/Userland/Games/Conway/main.cpp @@ -15,14 +15,14 @@ int main(int argc, char** argv) { - if (pledge("stdio rpath wpath cpath recvfd sendfd accept cpath unix fattr", nullptr) < 0) { + if (pledge("stdio rpath wpath cpath recvfd sendfd cpath unix", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio rpath recvfd sendfd accept", nullptr) < 0) { + if (pledge("stdio rpath recvfd sendfd", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Games/Minesweeper/main.cpp b/Userland/Games/Minesweeper/main.cpp index 8b6d9084a97..dafe9f8323f 100644 --- a/Userland/Games/Minesweeper/main.cpp +++ b/Userland/Games/Minesweeper/main.cpp @@ -21,14 +21,14 @@ int main(int argc, char** argv) { - if (pledge("stdio rpath accept wpath cpath recvfd sendfd unix fattr", nullptr) < 0) { + if (pledge("stdio rpath wpath cpath recvfd sendfd unix", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio rpath accept wpath cpath recvfd sendfd", nullptr) < 0) { + if (pledge("stdio rpath wpath cpath recvfd sendfd", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Games/Pong/main.cpp b/Userland/Games/Pong/main.cpp index a2f8b4a24c3..d94a2d9db00 100644 --- a/Userland/Games/Pong/main.cpp +++ b/Userland/Games/Pong/main.cpp @@ -16,14 +16,14 @@ int main(int argc, char** argv) { - if (pledge("stdio rpath wpath cpath recvfd sendfd accept cpath unix fattr", nullptr) < 0) { + if (pledge("stdio rpath wpath cpath recvfd sendfd cpath unix", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio rpath wpath cpath recvfd sendfd accept", nullptr) < 0) { + if (pledge("stdio rpath wpath cpath recvfd sendfd", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Games/Snake/main.cpp b/Userland/Games/Snake/main.cpp index 0b5e8734407..c4e0a600899 100644 --- a/Userland/Games/Snake/main.cpp +++ b/Userland/Games/Snake/main.cpp @@ -19,14 +19,14 @@ int main(int argc, char** argv) { - if (pledge("stdio rpath wpath cpath recvfd sendfd accept cpath unix fattr", nullptr) < 0) { + if (pledge("stdio rpath wpath cpath recvfd sendfd unix", nullptr) < 0) { perror("pledge"); return 1; } auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio rpath wpath cpath recvfd sendfd accept", nullptr) < 0) { + if (pledge("stdio rpath wpath cpath recvfd sendfd", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Services/AudioServer/main.cpp b/Userland/Services/AudioServer/main.cpp index 628eee1ae41..f0a34d1d3cd 100644 --- a/Userland/Services/AudioServer/main.cpp +++ b/Userland/Services/AudioServer/main.cpp @@ -10,7 +10,7 @@ int main(int, char**) { - if (pledge("stdio recvfd thread accept rpath wpath cpath unix fattr", nullptr) < 0) { + if (pledge("stdio recvfd thread accept cpath rpath wpath unix", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Services/ChessEngine/main.cpp b/Userland/Services/ChessEngine/main.cpp index 590ff56b2d4..d07e5ce1735 100644 --- a/Userland/Services/ChessEngine/main.cpp +++ b/Userland/Services/ChessEngine/main.cpp @@ -11,7 +11,7 @@ int main() { - if (pledge("stdio recvfd sendfd accept unix rpath cpath fattr", nullptr) < 0) { + if (pledge("stdio recvfd sendfd unix rpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Services/Clipboard/main.cpp b/Userland/Services/Clipboard/main.cpp index 4a0f63ec388..6afb6ad421f 100644 --- a/Userland/Services/Clipboard/main.cpp +++ b/Userland/Services/Clipboard/main.cpp @@ -12,15 +12,11 @@ int main(int, char**) { - if (pledge("stdio recvfd sendfd accept unix rpath cpath fattr", nullptr) < 0) { + if (pledge("stdio recvfd sendfd accept unix", nullptr) < 0) { perror("pledge"); return 1; } Core::EventLoop event_loop; - if (pledge("stdio recvfd sendfd unix accept", nullptr) < 0) { - perror("pledge"); - return 1; - } if (unveil(nullptr, nullptr) < 0) { perror("unveil"); return 1; diff --git a/Userland/Services/DHCPClient/main.cpp b/Userland/Services/DHCPClient/main.cpp index 01695ef78ba..a150b07e4a7 100644 --- a/Userland/Services/DHCPClient/main.cpp +++ b/Userland/Services/DHCPClient/main.cpp @@ -20,7 +20,7 @@ int main([[maybe_unused]] int argc, [[maybe_unused]] char** argv) { - if (pledge("stdio unix inet cpath rpath fattr", nullptr) < 0) { + if (pledge("stdio unix inet cpath rpath", nullptr) < 0) { perror("pledge"); return 1; } @@ -43,7 +43,7 @@ int main([[maybe_unused]] int argc, [[maybe_unused]] char** argv) auto ifs = ifs_result.release_value(); auto client = DHCPv4Client::construct(move(ifs.ready), move(ifs.not_ready)); - if (pledge("stdio inet cpath rpath fattr", nullptr) < 0) { + if (pledge("stdio inet cpath rpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Services/EchoServer/main.cpp b/Userland/Services/EchoServer/main.cpp index deb6d1aaee0..49b7af3965f 100644 --- a/Userland/Services/EchoServer/main.cpp +++ b/Userland/Services/EchoServer/main.cpp @@ -16,7 +16,7 @@ int main(int argc, char** argv) { - if (pledge("stdio cpath unix fattr inet id accept", nullptr) < 0) { + if (pledge("stdio unix inet id accept", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Services/LookupServer/main.cpp b/Userland/Services/LookupServer/main.cpp index 26db5092bc0..d4f0a89bc4e 100644 --- a/Userland/Services/LookupServer/main.cpp +++ b/Userland/Services/LookupServer/main.cpp @@ -12,7 +12,7 @@ int main([[maybe_unused]] int argc, [[maybe_unused]] char** argv) { - if (pledge("stdio accept unix inet cpath rpath fattr", nullptr) < 0) { + if (pledge("stdio accept unix inet rpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Services/NotificationServer/main.cpp b/Userland/Services/NotificationServer/main.cpp index e1473e10ea1..059c631c2b3 100644 --- a/Userland/Services/NotificationServer/main.cpp +++ b/Userland/Services/NotificationServer/main.cpp @@ -12,7 +12,7 @@ int main(int argc, char** argv) { - if (pledge("stdio recvfd sendfd accept rpath wpath cpath unix fattr", nullptr) < 0) { + if (pledge("stdio recvfd sendfd accept rpath unix", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Services/RequestServer/main.cpp b/Userland/Services/RequestServer/main.cpp index 0038c891f47..6f8e488b73d 100644 --- a/Userland/Services/RequestServer/main.cpp +++ b/Userland/Services/RequestServer/main.cpp @@ -15,7 +15,7 @@ int main(int, char**) { - if (pledge("stdio inet accept unix rpath cpath fattr sendfd recvfd", nullptr) < 0) { + if (pledge("stdio inet accept unix rpath sendfd recvfd", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Services/Taskbar/main.cpp b/Userland/Services/Taskbar/main.cpp index 557621dc682..5ddb9307e3f 100644 --- a/Userland/Services/Taskbar/main.cpp +++ b/Userland/Services/Taskbar/main.cpp @@ -31,7 +31,7 @@ static NonnullRefPtr build_system_menu(); int main(int argc, char** argv) { - if (pledge("stdio recvfd sendfd accept proc exec rpath unix cpath fattr sigaction", nullptr) < 0) { + if (pledge("stdio recvfd sendfd proc exec rpath unix sigaction", nullptr) < 0) { perror("pledge"); return 1; } @@ -46,7 +46,7 @@ int main(int argc, char** argv) // We need to obtain the WM connection here as well before the pledge shortening. GUI::WindowManagerServerConnection::the(); - if (pledge("stdio recvfd sendfd accept proc exec rpath", nullptr) < 0) { + if (pledge("stdio recvfd sendfd proc exec rpath", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Services/WebServer/main.cpp b/Userland/Services/WebServer/main.cpp index c2ecaada200..8fe7589ad67 100644 --- a/Userland/Services/WebServer/main.cpp +++ b/Userland/Services/WebServer/main.cpp @@ -37,7 +37,7 @@ int main(int argc, char** argv) return 1; } - if (pledge("stdio accept rpath inet unix cpath fattr", nullptr) < 0) { + if (pledge("stdio accept rpath inet unix", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Services/WebSocket/main.cpp b/Userland/Services/WebSocket/main.cpp index 3541b7e5afe..ab6ca577b2f 100644 --- a/Userland/Services/WebSocket/main.cpp +++ b/Userland/Services/WebSocket/main.cpp @@ -12,7 +12,7 @@ int main(int, char**) { - if (pledge("stdio inet accept unix rpath cpath fattr sendfd recvfd", nullptr) < 0) { + if (pledge("stdio inet unix rpath sendfd recvfd", nullptr) < 0) { perror("pledge"); return 1; } @@ -22,7 +22,7 @@ int main(int, char**) Core::EventLoop event_loop; // FIXME: Establish a connection to LookupServer and then drop "unix"? - if (pledge("stdio inet accept unix sendfd recvfd", nullptr) < 0) { + if (pledge("stdio inet unix sendfd recvfd", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Services/WindowServer/main.cpp b/Userland/Services/WindowServer/main.cpp index d5819954737..57c4f0fe7f8 100644 --- a/Userland/Services/WindowServer/main.cpp +++ b/Userland/Services/WindowServer/main.cpp @@ -19,7 +19,7 @@ int main(int, char**) { - if (pledge("stdio video thread sendfd recvfd accept rpath wpath cpath unix proc fattr sigaction", nullptr) < 0) { + if (pledge("stdio video thread sendfd recvfd accept rpath wpath cpath unix proc sigaction", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Shell/main.cpp b/Userland/Shell/main.cpp index f9462f05f7c..8c07b7ecc41 100644 --- a/Userland/Shell/main.cpp +++ b/Userland/Shell/main.cpp @@ -42,7 +42,7 @@ int main(int argc, char** argv) }); #ifdef __serenity__ - if (pledge("stdio rpath wpath cpath proc exec tty accept sigaction unix fattr", nullptr) < 0) { + if (pledge("stdio rpath wpath cpath proc exec tty sigaction unix fattr", nullptr) < 0) { perror("pledge"); return 1; }