-
Andrew Vagin authored
When we don't use userns, __userns_sysctl_op is called in context of the current process. A mount namespaces is restored the last one, so when we restore namespaces, we see /proc from the host pid namespace. In this case we can't use virtual pid to access /proc/pid. Let's open /proc/self/ns and use this descriptor to switch namespaces. Cc: Tycho Andersen <tycho.andersen@canonical.com> Fixes: f79f4546 ("sysctl: move sysctl calls to usernsd") Signed-off-by:
Andrew Vagin <avagin@openvz.org> Acked-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
a1457a7b