Skip to content

Commit

Permalink
su: Drop "tty" pledge promise after getting password from user
Browse files Browse the repository at this point in the history
There's not much work left to do at this point, but let's be strict.
  • Loading branch information
awesomekling committed Jan 9, 2021
1 parent 2b41155 commit 96c346c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Userland/su.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 96c346c

Please sign in to comment.