lxc startup: manually mark every shared mount entry as slave
lxc startup: manually mark every shared mount entry as slave

If you 'ip netns add x1', this creates /run/netns and /run/netns/x1
as shared mounts.  When a container starts, it umounts these after
pivot_root, and the umount is propagated to the host.

Worse, doing mount("", "/", NULL, MS_SLAVE|MS_REC, NULL) does not
suffice to change those, even after binding /proc/mounts onto
/etc/mtab.

So, I give up.  Do this manually, walking over /proc/self/mountinfo
and changing the mount propagation on everything marked as shared.

With this patch, lxc-start no longer unmounts /run/netns/* on the
host.

Signed-off-by: Serge Hallyn <3df611b026e4639bee8aef7a4beb2e39fcebb313@ubuntu.com>

ojkastl/lxc_Patches,ojkastl/lxc_Patches,ojkastl/lxc_Patches,ojkastl/lxc_Patches