Skip to content

Commit 00fa2aa

Browse files
committed
rmdir: Use pledge()
1 parent 7281214 commit 00fa2aa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Userland/rmdir.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030

3131
int main(int argc, char** argv)
3232
{
33+
if (pledge("stdio cpath", nullptr) < 0) {
34+
perror("pledge");
35+
return 1;
36+
}
37+
3338
if (argc != 2) {
3439
fprintf(stderr, "usage: rmdir <path>\n");
3540
return 1;

0 commit comments

Comments
 (0)