summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-02-18 10:58:56 +0100
committerAndreas Kling <kling@serenityos.org>2020-02-18 11:35:47 +0100
commit0b44f9d6009f94ed672d3d713c464f3993cfad62 (patch)
tree035e50e651bf47ca5b5f3d0b7c690dbdfd661e2b /Userland
parent7266cee590418f8755ab3ca6e42e72b24c746510 (diff)
downloadserenity-0b44f9d6009f94ed672d3d713c464f3993cfad62.zip
which: Use pledge()
Diffstat (limited to 'Userland')
-rw-r--r--Userland/which.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Userland/which.cpp b/Userland/which.cpp
index 31c3c47ea6..67a9bb8106 100644
--- a/Userland/which.cpp
+++ b/Userland/which.cpp
@@ -31,6 +31,11 @@
int main(int argc, char** argv)
{
+ if (pledge("stdio rpath", nullptr) < 0) {
+ perror("pledge");
+ return 1;
+ }
+
if (argc < 2) {
printf("usage: which <executable>\n");
return 0;