ELI5 request: Why podman
cannot spawn the pasta/rootlesskit/slirp4netns
port mapper process with CAP_NET_BIND_SERVICE capability?
#20664
-
In #3212, you suggest a workaround by using Since the issue is locked I cannot ask there for clarification. I am asking here again, @AkihiroSuda @rhatdan if you don't mind: Why do you suggest a worse workaround than allowing CAP_NET_BIND_SERVICE to Is that the answer actually a technical challenge/impossibility? Can podman not drop this particular capability after entering the new namespace? Or it is not up to Thanks
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Podman technically never explicitly drops capabilities, the thing is if you enter a new user namespace you gain all caps but only relative to the new userns. This means that it indirectly drops all the caps for the parent user namespace which means you now are no longer allowed to modify any of the namespaces created by the parent such as the host netns. The podman user namespace is critical to podman's function as it allows us to mount images as rootless user and much more. Therefore the podman design is to basically allows join the userns right away. The only way to make it work would be to spawn the rootless networking process from the hosts/init userns and not from the podman userns. This however is not technically possible without a major rewrite on how podman works, basically we would need two processes one that stays in the host userns and one that joins the podman userns and then have some form of API between them so we can tell the parent to launch which processes and so on. And I don't think anyone would want to do this. |
Beta Was this translation helpful? Give feedback.
Podman technically never explicitly drops capabilities, the thing is if you enter a new user namespace you gain all caps but only relative to the new userns. This means that it indirectly drops all the caps for the parent user namespace which means you now are no longer allowed to modify any of the namespaces created by the parent such as the host netns.
The podman user namespace is critical to podman's function as it allows us to mount images as rootless user and much more. Therefore the podman design is to basically allows join the userns right away.
The only way to make it work would be to spawn the rootless networking process from the hosts/init userns and not from the podman userns. …