mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:37:34 +00:00
su+passwd: Don't copy Core::Account unnecessarily
This commit is contained in:
parent
2ba9e6c866
commit
9766f61f7b
2 changed files with 2 additions and 2 deletions
|
@ -108,7 +108,7 @@ int main(int argc, char** argv)
|
|||
}
|
||||
|
||||
// target_account is the account we are changing the password of.
|
||||
auto target_account = account_or_error.value();
|
||||
auto& target_account = account_or_error.value();
|
||||
|
||||
if (current_uid != 0 && current_uid != target_account.uid()) {
|
||||
fprintf(stderr, "You can't modify passwd for %s\n", username);
|
||||
|
|
|
@ -68,7 +68,7 @@ int main(int argc, char** argv)
|
|||
return 1;
|
||||
}
|
||||
|
||||
Core::Account account = account_or_error.value();
|
||||
const auto& account = account_or_error.value();
|
||||
|
||||
if (getuid() != 0 && account.has_password()) {
|
||||
auto password = Core::get_password();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue