Skip to content

Add setuid and setgid fork action#803

Merged
talex5 merged 1 commit intoocaml-multicore:mainfrom
patricoferris:process-users
Sep 1, 2025
Merged

Add setuid and setgid fork action#803
talex5 merged 1 commit intoocaml-multicore:mainfrom
patricoferris:process-users

Conversation

@patricoferris
Copy link
Copy Markdown
Collaborator

This allows the child to be a different user which is particularly useful if, for whatever reason, you need to run your program as root but want to spawn child processes as a different, non-root user.

Having something for group ID would also be good.

I'm also wondering if the Eio API could be related to #802 -- some kind of Job Control API?

@talex5
Copy link
Copy Markdown
Collaborator

talex5 commented May 24, 2025

Seems reasonable, but shouldn't we have a way to do setgid and setgroups too?

@patricoferris patricoferris changed the title Add setuid fork action Add setuid and setgid fork action Aug 23, 2025
@patricoferris
Copy link
Copy Markdown
Collaborator Author

I have added setgid as well. Setgroups probably makes sense, but I don't have a need right now for it. Compared with original code I pushed, I have also removed any changes to the cross-platform API.

Copy link
Copy Markdown
Collaborator

@talex5 talex5 left a comment

Choose a reason for hiding this comment

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

Thanks!

@talex5 talex5 merged commit 989fc81 into ocaml-multicore:main Sep 1, 2025
5 checks passed
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