From 03aea115897b521491f62abe905224ca448d92c9 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 18 Feb 2020 13:20:52 +0100 Subject: [PATCH] date: Use pledge() --- Userland/date.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Userland/date.cpp b/Userland/date.cpp index aec24f4ee3..6aef649116 100644 --- a/Userland/date.cpp +++ b/Userland/date.cpp @@ -32,6 +32,11 @@ int main(int argc, char** argv) { + if (pledge("stdio", nullptr) < 0) { + perror("pledge"); + return 1; + } + time_t now = time(nullptr); if (argc == 2 && !strcmp(argv[1], "-u")) {