summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-02-18 13:23:32 +0100
committerAndreas Kling <kling@serenityos.org>2020-02-18 13:29:54 +0100
commitb58728ed9903ff6772cfd80144ea47b4fe0a2777 (patch)
treea86530b04ac48bc49b34d0a6f75ac505a6fd1881
parenta5f0b2aef070d99bbe5517a928711ba5632798b9 (diff)
downloadserenity-b58728ed9903ff6772cfd80144ea47b4fe0a2777.zip
rm: Use pledge()
-rw-r--r--Userland/rm.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Userland/rm.cpp b/Userland/rm.cpp
index 8c2a7c325f..b1a55cc18d 100644
--- a/Userland/rm.cpp
+++ b/Userland/rm.cpp
@@ -73,6 +73,11 @@ int remove(bool recursive, String path)
int main(int argc, char** argv)
{
+ if (pledge("stdio rpath cpath", nullptr) < 0) {
+ perror("pledge");
+ return 1;
+ }
+
bool recursive = false;
const char* path = nullptr;