From 96c346cfb0cd090a883ac5b2ad1915365e5c8a60 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 9 Jan 2021 22:19:31 +0100 Subject: [PATCH] su: Drop "tty" pledge promise after getting password from user There's not much work left to do at this point, but let's be strict. --- Userland/su.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Userland/su.cpp b/Userland/su.cpp index d74e9a38e8..f69fe80ad5 100644 --- a/Userland/su.cpp +++ b/Userland/su.cpp @@ -85,6 +85,11 @@ int main(int argc, char** argv) } } + if (pledge("stdio exec id", nullptr) < 0) { + perror("pledge"); + return 1; + } + if (!account.login()) { perror("Core::Account::login"); return 1;