From 540d9caa8e5afcca2a86097a131fa9c70d96f2a2 Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Sat, 22 Feb 2020 12:14:21 -0800 Subject: [PATCH] head: Use pledge() --- Userland/head.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Userland/head.cpp b/Userland/head.cpp index 8cfd91b68bb..db78e803b0a 100644 --- a/Userland/head.cpp +++ b/Userland/head.cpp @@ -35,6 +35,11 @@ int head(const String& filename, bool print_filename, int line_count, int char_c int main(int argc, char** argv) { + if (pledge("stdio rpath", nullptr) < 0) { + perror("pledge"); + return 1; + } + int line_count = 0; int char_count = 0; bool never_print_filenames = false;