Userland: Fix id(1) printing the user's primary group for extra gids

This regressed in 538cc9d9 because of a typo.
This commit is contained in:
sin-ack 2021-07-31 15:49:08 +00:00 committed by Andreas Kling
parent 08359ba578
commit ce3f8661fb
Notes: sideshowbarker 2024-07-18 07:40:52 +09:00

View File

@ -134,7 +134,7 @@ static bool print_full_id_list(Core::Account const& account)
out("uid={}({}) gid={}({})", uid, pw ? pw->pw_name : "n/a", gid, gr ? gr->gr_name : "n/a");
for (auto extra_gid : account.extra_gids()) {
auto* gr = getgrgid(gid);
auto* gr = getgrgid(extra_gid);
if (gr)
out(" {}({})", extra_gid, gr->gr_name);
else