From feb4c683eb29c1a68b39f8169dba4dcfa3f49899 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 18 Feb 2020 13:25:34 +0100 Subject: [PATCH] touch: Use pledge() --- Userland/touch.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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 \n"); return 1;