Skip to content

feat: daemon mode, IPC allowlist, and initgroups for runAsUser - #9

Merged
keskad merged 3 commits into
mainfrom
feat/daemon-mode-socket-allow-initgroups
Aug 6, 2026
Merged

feat: daemon mode, IPC allowlist, and initgroups for runAsUser#9
keskad merged 3 commits into
mainfrom
feat/daemon-mode-socket-allow-initgroups

Conversation

@keskad

@keskad keskad commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Report init vs supervise in DaemonInfo and microinit info
  • Add socketAllowUsers so non-root peers (e.g. bigfred) can use the control socket
  • Use initgroups() for named runAsUser values to preserve supplementary groups (e.g. dialout)
  • Extend Go client with Mode and ShutdownMode()

Test plan

  • cargo test
  • microinit info on BigFredOS shows mode: init
  • bigfred user can call shutdown via IPC when listed in socketAllowUsers

Made with Cursor

keskad and others added 2 commits August 5, 2026 21:42
Report init vs supervise in DaemonInfo, let configured users reach the
control socket, and preserve supplementary groups when dropping privileges.

Co-authored-by: Cursor <cursoragent@cursor.com>
Numeric uid specs keep the fail-closed setgroups([]) path so existing
identity-drop tests and configs behave as before.

Co-authored-by: Cursor <cursoragent@cursor.com>
Fail closed when named_user lacks username/gid; capture daemon_uid for
peer checks and socket chown; document socketAllowUsers group ordering;
document halt vs reboot/poweroff in the Go client.

Co-authored-by: Cursor <cursoragent@cursor.com>
@keskad
keskad merged commit d66d16e into main Aug 6, 2026
9 checks passed
@keskad
keskad deleted the feat/daemon-mode-socket-allow-initgroups branch August 6, 2026 07:41
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