diff --git a/Applications/Calculator/main.cpp b/Applications/Calculator/main.cpp index f38251eb42..e89302bf59 100644 --- a/Applications/Calculator/main.cpp +++ b/Applications/Calculator/main.cpp @@ -5,11 +5,22 @@ #include #include #include +#include int main(int argc, char** argv) { + if (pledge("stdio shared_buffer unix rpath cpath fattr", nullptr) < 0) { + perror("pledge"); + return 1; + } + GApplication app(argc, argv); + if (pledge("stdio shared_buffer rpath", nullptr) < 0) { + perror("pledge"); + return 1; + } + auto window = GWindow::construct(); window->set_title("Calculator"); window->set_resizable(false); diff --git a/Applications/DisplayProperties/main.cpp b/Applications/DisplayProperties/main.cpp index 2f1e7fcf71..fe01d670b8 100644 --- a/Applications/DisplayProperties/main.cpp +++ b/Applications/DisplayProperties/main.cpp @@ -8,10 +8,22 @@ #include #include #include +#include int main(int argc, char** argv) { + if (pledge("stdio shared_buffer unix rpath cpath wpath fattr", nullptr) < 0) { + perror("pledge"); + return 1; + } + GApplication app(argc, argv); + + if (pledge("stdio shared_buffer rpath cpath wpath", nullptr) < 0) { + perror("pledge"); + return 1; + } + DisplayPropertiesWidget instance; auto window = GWindow::construct(); diff --git a/Applications/FontEditor/main.cpp b/Applications/FontEditor/main.cpp index 110c37b35e..b143f3835e 100644 --- a/Applications/FontEditor/main.cpp +++ b/Applications/FontEditor/main.cpp @@ -9,8 +9,18 @@ int main(int argc, char** argv) { + if (pledge("stdio shared_buffer unix rpath cpath wpath fattr", nullptr) < 0) { + perror("pledge"); + return 1; + } + GApplication app(argc, argv); + if (pledge("stdio shared_buffer rpath cpath wpath", nullptr) < 0) { + perror("pledge"); + return 1; + } + RefPtr edited_font; String path; diff --git a/Applications/HexEditor/main.cpp b/Applications/HexEditor/main.cpp index f540dcc5fd..5f70b92b0b 100644 --- a/Applications/HexEditor/main.cpp +++ b/Applications/HexEditor/main.cpp @@ -1,10 +1,21 @@ #include "HexEditorWidget.h" #include +#include int main(int argc, char** argv) { + if (pledge("stdio shared_buffer unix rpath cpath wpath fattr", nullptr) < 0) { + perror("pledge"); + return 1; + } + GApplication app(argc, argv); + if (pledge("stdio shared_buffer rpath cpath wpath", nullptr) < 0) { + perror("pledge"); + return 1; + } + auto window = GWindow::construct(); window->set_title("Hex Editor"); window->set_rect(20, 200, 640, 400); diff --git a/Applications/PaintBrush/main.cpp b/Applications/PaintBrush/main.cpp index 571b7bf224..a3fb589508 100644 --- a/Applications/PaintBrush/main.cpp +++ b/Applications/PaintBrush/main.cpp @@ -11,11 +11,22 @@ #include #include #include +#include int main(int argc, char** argv) { + if (pledge("stdio shared_buffer unix rpath wpath cpath fattr", nullptr) < 0) { + perror("pledge"); + return 1; + } + GApplication app(argc, argv); + if (pledge("stdio shared_buffer rpath wpath cpath", nullptr) < 0) { + perror("pledge"); + return 1; + } + auto window = GWindow::construct(); window->set_title("PaintBrush"); window->set_rect(100, 100, 640, 480);