1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:47:35 +00:00

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".
This commit is contained in:
Andreas Kling 2021-01-22 19:28:17 +01:00
parent b0f19c2af4
commit 2ab9083420

View file

@ -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;
}