summaryrefslogtreecommitdiff
path: root/Applications/Calculator
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2020-01-13 12:22:49 +0100
committerAndreas Kling <awesomekling@gmail.com>2020-01-13 14:41:15 +0100
commit56428e764e39252cda1cfd9d0efcbb3a6a0fdd8d (patch)
treeb24c6d887bd32c2213fbe1296375137dca51beed /Applications/Calculator
parent6182a1a71c83ea5c223894e5665abbec57fa2150 (diff)
downloadserenity-56428e764e39252cda1cfd9d0efcbb3a6a0fdd8d.zip
Applications: Use pledge()
Add some basic pledges to the following apps: - Calculator - DisplayProperties - FontEditor - HexEditor - PaintBrush
Diffstat (limited to 'Applications/Calculator')
-rw-r--r--Applications/Calculator/main.cpp11
1 files changed, 11 insertions, 0 deletions
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 <LibGUI/GApplication.h>
#include <LibGUI/GMenuBar.h>
#include <LibGUI/GWindow.h>
+#include <stdio.h>
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);