From ce3f8661fb736046f1f79e17ea7bee795ae07bdc Mon Sep 17 00:00:00 2001 From: sin-ack Date: Sat, 31 Jul 2021 15:49:08 +0000 Subject: [PATCH] Userland: Fix id(1) printing the user's primary group for extra gids This regressed in 538cc9d9 because of a typo. --- Userland/Utilities/id.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Utilities/id.cpp b/Userland/Utilities/id.cpp index e2de46dfc1..c7a5a17568 100644 --- a/Userland/Utilities/id.cpp +++ b/Userland/Utilities/id.cpp @@ -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