4 Commits

Author SHA1 Message Date
state-plumber
aaf263957b Change ownership of admin socket before dropping permissions (#1336)
This is to allow access to the socket by members of the group that
permissions are dropped to.
2026-05-12 21:39:55 +01:00
Neil Alexander
24482b7dbe Run go fix, corrects mostly build tags 2026-01-18 14:47:18 +00:00
Neil Alexander
657f7e0db3 Fix empty user/group detection on chuser
This should fix #1216.
2024-12-13 16:55:25 +00:00
Klemens Nanni
c22a746a1d Rewrite chuser() for simplicity and correctness (#1203)
- 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 set[ug]id(2) to follow the idiom of OpenBSD base programs.
  (cannot use setres[ug]id(2) as macOS does not have them.)

Includes/Supersedes #1202.
Fixes #927.

I only tested on OpenBSD (so far), but other systems should just work.
2024-11-17 21:37:07 +00:00