Skip to content

Conversation

@denendaden
Copy link

The uutils id previously exhibited different behavior from the GNU id, as shown in the following example:

$ sudo setpriv --reuid 3000 --egid 2000 --clear-groups target/release/id
uid=3000(u3000) gid=0(root) egid=2000(u2000) groups=0(root)
$ sudo setpriv --reuid 3000 --egid 2000 --clear-groups id
uid=3000(u3000) gid=0(root) egid=2000(u2000) groups=2000(u2000)

This discrepancy is because GNU id forms its list of groups by combining the effective group ID with a list of supplementary group IDs, whereas uutils id was, except when certain flags were provided, using the real group ID in place of the effective group ID. This pull request changes this behavior by passing None to get_groups_gnu, so that it uses the effective group ID instead of the group ID being passed to it, matching the GNU behavior.

Changes to numfmt were unrelated but necessary to get it to compile. I was not sure what to do about this.

Fixes #10006

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

GNU testsuite comparison:

Skip an intermittent issue tests/shuf/shuf-reservoir (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/sort/sort-stale-thread-mem (fails in this run but passes in the 'main' branch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Various problems in different id handling in id command

1 participant