summaryrefslogtreecommitdiff
path: root/Applications
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2020-01-11 22:13:38 +0100
committerAndreas Kling <awesomekling@gmail.com>2020-01-11 22:13:38 +0100
commitb39e732eb321377d6c19a209a1787c7f97f9a7e5 (patch)
treef63e65d58322028c16b4086669523ec3208adaca /Applications
parent75c5e9af56370a7ae02f0baa7ffae41b599dd80a (diff)
downloadserenity-b39e732eb321377d6c19a209a1787c7f97f9a7e5.zip
FileManager: Use pledge()
Diffstat (limited to 'Applications')
-rw-r--r--Applications/FileManager/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Applications/FileManager/main.cpp b/Applications/FileManager/main.cpp
index 1c1da6bf41..05edfee89e 100644
--- a/Applications/FileManager/main.cpp
+++ b/Applications/FileManager/main.cpp
@@ -31,6 +31,11 @@
int main(int argc, char** argv)
{
+ if (pledge("stdio thread unix shared_buffer cpath rpath wpath fattr proc exec", nullptr) < 0) {
+ perror("pledge");
+ return 1;
+ }
+
struct sigaction act;
memset(&act, 0, sizeof(act));
act.sa_flags = SA_NOCLDWAIT;