Let's say I spawn 2 processes in 2 different namespaces as described by this LWN article.
- The first one maps UID 0 inside the ns to UID 1000 outside the ns.
- The second one maps UID 200 inside the ns to UID 1000 outside the ns.
I came up with this figure to visualize it:
Question #1: is the figure accurate?
Question #2: why is it that when I issue a ps
command in the bash process running in "user namespace 2", I see the bash process of "user namespace 1" as running with UID 200? I have some ideas of how this could work but I just can't find it written anywhere and I'd like to know the exact steps of the resolution.