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

setns happens in child process after uid/gid mapping #28

Open
skeptomai opened this issue Jul 16, 2022 · 0 comments
Open

setns happens in child process after uid/gid mapping #28

skeptomai opened this issue Jul 16, 2022 · 0 comments

Comments

@skeptomai
Copy link

I want to put the child into a network namespace by calling setns, but this requires CAP_SYS_ADMIN, which I've lost after the uid/gid mapping. (Basically building a rootless container). The calls to setns happen in child_after_clone, which is called after the uid/gid mapping is done in after_start, which then wakes the child process. So the order currently is:

clone->wait->after_start (which does uid/gid mapping) -> wakeup -> child_after_clone (which calls setns)

Am I doing something wrong?

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

No branches or pull requests

1 participant