From f67f70302b9418d80d8248380ca39a299bd232f9 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 18 Feb 2020 13:28:08 +0100 Subject: [PATCH] uname: Use pledge() --- Userland/uname.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Userland/uname.cpp b/Userland/uname.cpp index 8db9d7f6b0..b24b33cee7 100644 --- a/Userland/uname.cpp +++ b/Userland/uname.cpp @@ -26,9 +26,15 @@ #include #include +#include int main(int argc, char** argv) { + if (pledge("stdio", nullptr) < 0) { + perror("pledge"); + return 1; + } + utsname uts; int rc = uname(&uts); if (rc < 0) {