Control: tags -1 + upstream
Control: forwarded -1 https://github.com/karelzak/util-linux/issues/935 

Hi,

thanks for your report.

* Michael Braun <michael-...@fami-braun.de> [200415 00:21]:
[..]
>  ~ # unshare --pid=/tmp/test-pid --mount=/tmp/test-mnt --fork --mount-proc
[..]
> I expected nsenter to join the pid namespace given.
> I expected /tmp/test-pid to not shared PID namespace with /init but instead 
> with PID 17409.
> 
> This is probably due to the PID namespace not affecting the unshare main 
> process after the unshare syscall, but only its child processes.
> Therefore bind_ns_files_from_child should probably call bind_ns_files not 
> with the parent (unshare process) process id but its child process id.
> To fix it, instead of ns/pid, ns/pid_for_children could be used. Though, 
> ns/pid_for_children is empty before the first child has been created, so 
> unshare.c needs some more work than just replacing ns/pid with 
> ns/pid_for_children.

I believe this is the same as upstream report
https://github.com/karelzak/util-linux/issues/935 , please check if
you agree with this assessment.

If you can help upstream in any way implementing this change, please
correspond on the upstream issue. Downstream in Debian there's not
much we can/want to do in util-linux.

Cheers,
Chris

Reply via email to