Skip to content

Conversation

@gustavosbarreto
Copy link
Member

The ListGroups function was only returning secondary groups from
/etc/group, missing the user's primary group defined in /etc/passwd.

This commit modifies the ListGroups method to:

  • First retrieve the user's primary group (GID) from /etc/passwd
  • Then append secondary groups from /etc/group
  • Avoid duplicates if the primary group is also listed in /etc/group

The ListGroups function was only returning secondary groups from
`/etc/group`, missing the user's primary group defined in `/etc/passwd`.

This commit modifies the ListGroups method to:
- First retrieve the user's primary group (GID) from /etc/passwd
- Then append secondary groups from /etc/group
- Avoid duplicates if the primary group is also listed in /etc/group
@gustavosbarreto gustavosbarreto requested a review from a team as a code owner December 4, 2025 19:26
@gustavosbarreto gustavosbarreto merged commit de553b7 into master Dec 4, 2025
12 checks passed
@gustavosbarreto gustavosbarreto deleted the fix/osauth-include-primary-group branch December 4, 2025 19:37
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.

2 participants