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

Rewrite chuser() for simplicity and correctness #1203

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

klemensn
Copy link
Contributor

@klemensn klemensn commented Nov 4, 2024

  • Use unambiguous variable names (w/o package name conflict).
  • Fail on invalid input such as the empty string or :.
  • Do not change group without user, i.e. fail on :group.
  • Parse input using mnemonic APIs.
  • Do not juggle between integer types.
  • Unset supplementary groups.
  • Use setres[ug]id(2) to match the idiom of OpenBSD base programs.

Includes/Supersedes #1202.
Fixes #927.

I only tested on OpenBSD (so far), hence the split, but other systems should just work.

- Use unambiguous variable names (w/o package name conflict).
- Fail on invalid input such as the empty string or `:`.
- Do not change group without user, i.e. fail on `:group`.
- Parse input using mnemonic APIs.
- Do not juggle between integer types.
- Unset supplementary groups.
- Use setres[ug]id(2) to match the idiom of OpenBSD base programs.

Includes/Supersedes yggdrasil-network#1202.
Fixes yggdrasil-network#927.

I only tested on OpenBSD (so far), hence the split, but other systems
should just work.
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.

1 participant