forked from opencontainers/runc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust user ns join order and become root in the ns after joined user ns
fix: opencontainers#4466, in containerd, for user ns pod, the net and user ns has been created before start the container, and let runc join these two ns when starting the init process, it works for normal systems, except systems with selinux enabling and has mount label configed. We can resolve it with two steps: 1. Join the user ns after joined all other namespaces, there may be some namespaces are not owned by the user namespace; 2. Should also become root in the namespace, if we have joined a user ns path like what we do in unsharing a new user ns. Signed-off-by: lifubang <lifubang@acmcoder.com>
- Loading branch information
Showing
1 changed file
with
25 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters