Browse Source

rm: Use pledge()

Andreas Kling 5 years ago
parent
commit
b58728ed99
1 changed files with 5 additions and 0 deletions
  1. 5 0
      Userland/rm.cpp

+ 5 - 0
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;