Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add effective group as the first element in the call to set groups #937

Merged
merged 3 commits into from
Jan 6, 2025

Conversation

squell
Copy link
Member

@squell squell commented Dec 19, 2024

This is my proposed alternative to PR #936. It's clear that inserting the effective group needs to happen at the start, not the end of the list; but the proposed solution there makes the rest of the policy module too dependent command line flags (and doesn't seem to solve the issue in case someone decides to use -g to add the currently effective group).

@squell squell added portability freebsd non-compliant used to track failing compliance tests labels Dec 19, 2024
@squell
Copy link
Member Author

squell commented Dec 19, 2024

I have confirmed that b5f82b4 fixes the failure of sudo::flag_group::adds_group_to_groups_output and su::flag_group::when_specified_more_than_once_all_groups_are_added_to_group_list on FreeBSD.

@squell squell force-pushed the freebsd-fix-groups branch from c47f9da to 0ccfc1e Compare December 19, 2024 13:41
@bjorn3
Copy link
Collaborator

bjorn3 commented Dec 19, 2024

Much better than my PR :)

@squell
Copy link
Member Author

squell commented Dec 19, 2024

Still need to add a test for situations when the requested primary group id is already part of the group list.

@squell
Copy link
Member Author

squell commented Dec 19, 2024

Note (since we do not have FreeBSD in our CI yet):

  • cdd3e87 adds a test that failed on FreeBSD

  • ea08378fixes that test :-)

@squell squell marked this pull request as ready for review December 19, 2024 16:00
@squell squell force-pushed the freebsd-fix-groups branch from b663634 to ea08378 Compare December 19, 2024 16:08
@squell squell linked an issue Dec 19, 2024 that may be closed by this pull request
3 tasks
@squell squell force-pushed the freebsd-fix-groups branch from ea08378 to 291b179 Compare January 6, 2025 12:19
Copy link
Collaborator

@bjorn3 bjorn3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine on FreeBSD.

@squell squell merged commit 33fd1c3 into main Jan 6, 2025
13 checks passed
@squell squell deleted the freebsd-fix-groups branch January 6, 2025 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
freebsd non-compliant used to track failing compliance tests portability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get sudo-rs to compile on FreeBSD
2 participants