diff options
author | Andreas Kling <kling@serenityos.org> | 2020-02-18 13:25:34 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-02-18 13:29:54 +0100 |
commit | feb4c683eb29c1a68b39f8169dba4dcfa3f49899 (patch) | |
tree | 5c87279d6e6ea0738fdb01953324661ff4d677d2 /Userland | |
parent | b58728ed9903ff6772cfd80144ea47b4fe0a2777 (diff) | |
download | serenity-feb4c683eb29c1a68b39f8169dba4dcfa3f49899.zip |
touch: Use pledge()
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/touch.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Userland/touch.cpp b/Userland/touch.cpp index 7ce11f2d4c..574e97790f 100644 --- a/Userland/touch.cpp +++ b/Userland/touch.cpp @@ -50,6 +50,11 @@ static bool file_exists(const char* path) int main(int argc, char** argv) { + if (pledge("stdio rpath cpath fattr", nullptr)) { + perror("pledge"); + return 1; + } + if (argc != 2) { fprintf(stderr, "usage: touch <path>\n"); return 1; |