From b2086c8d7749f6bab881091806fff85fff1f353d Mon Sep 17 00:00:00 2001 From: TheMorc Date: Fri, 15 Jan 2021 18:07:51 +0100 Subject: [PATCH] Demos+Games: Pledge "sendfd" in demos and games --- Userland/Demos/CatDog/main.cpp | 4 ++-- Userland/Demos/Cube/Cube.cpp | 2 +- Userland/Demos/Fire/Fire.cpp | 2 +- Userland/Demos/LibGfxDemo/main.cpp | 2 +- Userland/Demos/LibGfxScaleDemo/main.cpp | 2 +- Userland/Demos/Mouse/main.cpp | 2 +- Userland/Demos/WidgetGallery/main.cpp | 2 +- Userland/Games/Breakout/main.cpp | 4 ++-- Userland/Games/Solitaire/main.cpp | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Userland/Demos/CatDog/main.cpp b/Userland/Demos/CatDog/main.cpp index 3b7587a65d3..282ada7534c 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 sendfd shared_buffer accept unix fattr", nullptr) < 0) { + if (pledge("stdio sendfd rpath wpath cpath sendfd shared_buffer accept unix fattr", nullptr) < 0) { perror("pledge"); return 1; } @@ -202,7 +202,7 @@ int main(int argc, char** argv) auto app = GUI::Application::construct(argc, argv); auto app_icon = GUI::Icon::default_icon("app-catdog"); - if (pledge("stdio rpath shared_buffer", nullptr) < 0) { + if (pledge("stdio sendfd rpath shared_buffer", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Demos/Cube/Cube.cpp b/Userland/Demos/Cube/Cube.cpp index f7273c7d796..e40d21bd315 100644 --- a/Userland/Demos/Cube/Cube.cpp +++ b/Userland/Demos/Cube/Cube.cpp @@ -193,7 +193,7 @@ int main(int argc, char** argv) { auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio rpath shared_buffer", nullptr) < 0) { + if (pledge("stdio sendfd rpath shared_buffer", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Demos/Fire/Fire.cpp b/Userland/Demos/Fire/Fire.cpp index 2e91c783332..f2861d0a11d 100644 --- a/Userland/Demos/Fire/Fire.cpp +++ b/Userland/Demos/Fire/Fire.cpp @@ -216,7 +216,7 @@ int main(int argc, char** argv) { auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio rpath shared_buffer", nullptr) < 0) { + if (pledge("stdio sendfd rpath shared_buffer", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Demos/LibGfxDemo/main.cpp b/Userland/Demos/LibGfxDemo/main.cpp index c60c0e56d6e..ef8f0693127 100644 --- a/Userland/Demos/LibGfxDemo/main.cpp +++ b/Userland/Demos/LibGfxDemo/main.cpp @@ -200,7 +200,7 @@ int main(int argc, char** argv) { auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio rpath shared_buffer", nullptr) < 0) { + if (pledge("stdio sendfd rpath shared_buffer", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Demos/LibGfxScaleDemo/main.cpp b/Userland/Demos/LibGfxScaleDemo/main.cpp index ade1e1da627..83eb6a23ab3 100644 --- a/Userland/Demos/LibGfxScaleDemo/main.cpp +++ b/Userland/Demos/LibGfxScaleDemo/main.cpp @@ -92,7 +92,7 @@ int main(int argc, char** argv) { auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio rpath shared_buffer", nullptr) < 0) { + if (pledge("stdio sendfd rpath shared_buffer", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Demos/Mouse/main.cpp b/Userland/Demos/Mouse/main.cpp index 80960610a86..352f394fc43 100644 --- a/Userland/Demos/Mouse/main.cpp +++ b/Userland/Demos/Mouse/main.cpp @@ -174,7 +174,7 @@ int main(int argc, char** argv) auto app = GUI::Application::construct(argc, argv); auto app_icon = GUI::Icon::default_icon("app-mouse"); - if (pledge("stdio rpath shared_buffer", nullptr) < 0) { + if (pledge("stdio sendfd rpath shared_buffer", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Demos/WidgetGallery/main.cpp b/Userland/Demos/WidgetGallery/main.cpp index 37e5c4efa25..b331bcc9704 100644 --- a/Userland/Demos/WidgetGallery/main.cpp +++ b/Userland/Demos/WidgetGallery/main.cpp @@ -86,7 +86,7 @@ int main(int argc, char** argv) { auto app = GUI::Application::construct(argc, argv); - if (pledge("stdio rpath shared_buffer", nullptr) < 0) { + if (pledge("stdio sendfd rpath shared_buffer", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Games/Breakout/main.cpp b/Userland/Games/Breakout/main.cpp index 578bda8c83e..347dd10bcbb 100644 --- a/Userland/Games/Breakout/main.cpp +++ b/Userland/Games/Breakout/main.cpp @@ -34,14 +34,14 @@ int main(int argc, char** argv) { - if (pledge("stdio rpath wpath cpath sendfd shared_buffer accept unix fattr", nullptr) < 0) { + if (pledge("stdio sendfd rpath wpath cpath sendfd shared_buffer accept 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 sendfd rpath shared_buffer", nullptr) < 0) { perror("pledge"); return 1; } diff --git a/Userland/Games/Solitaire/main.cpp b/Userland/Games/Solitaire/main.cpp index de04b182182..7607c9b4b7a 100644 --- a/Userland/Games/Solitaire/main.cpp +++ b/Userland/Games/Solitaire/main.cpp @@ -39,7 +39,7 @@ int main(int argc, char** argv) auto app = GUI::Application::construct(argc, argv); auto app_icon = GUI::Icon::default_icon("app-solitaire"); - if (pledge("stdio rpath shared_buffer", nullptr) < 0) { + if (pledge("stdio sendfd rpath shared_buffer", nullptr) < 0) { perror("pledge"); return 1; }