From 2ab9083420226bde315a9172e10f8ae69d23c190 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 22 Jan 2021 19:28:17 +0100 Subject: [PATCH] passwd: Drop "rpath" pledge after opening files We needed this for mkstemp() since it used lstat() internally. Now that it only uses open(), we don't need to pledge "rpath". --- Userland/Utilities/passwd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Utilities/passwd.cpp b/Userland/Utilities/passwd.cpp index 188ca3bf15..65a1508ba5 100644 --- a/Userland/Utilities/passwd.cpp +++ b/Userland/Utilities/passwd.cpp @@ -84,7 +84,7 @@ int main(int argc, char** argv) setpwent(); - if (pledge("stdio rpath wpath cpath fattr tty", nullptr) < 0) { + if (pledge("stdio wpath cpath fattr tty", nullptr) < 0) { perror("pledge"); return 1; } @@ -113,7 +113,7 @@ int main(int argc, char** argv) target_account.set_password(new_password.value().characters()); } - if (pledge("stdio rpath wpath cpath fattr", nullptr) < 0) { + if (pledge("stdio wpath cpath fattr", nullptr) < 0) { perror("pledge"); return 1; }