From: Eric W. Biederman Date: Fri, 22 Mar 2013 11:08:05 +0000 (-0700) Subject: vfs: Carefully propogate mounts across user namespaces X-Git-Tag: v3.9-rc5~21^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=132c94e31b8bca8ea921f9f96a57d684fa4ae0a9;p=pandora-kernel.git vfs: Carefully propogate mounts across user namespaces As a matter of policy MNT_READONLY should not be changable if the original mounter had more privileges than creator of the mount namespace. Add the flag CL_UNPRIVILEGED to note when we are copying a mount from a mount namespace that requires more privileges to a mount namespace that requires fewer privileges. When the CL_UNPRIVILEGED flag is set cause clone_mnt to set MNT_NO_REMOUNT if any of the mnt flags that should never be changed are set. This protects both mount propagation and the initial creation of a less privileged mount namespace. Cc: stable@vger.kernel.org Acked-by: Serge Hallyn Reported-by: Andy Lutomirski Signed-off-by: "Eric W. Biederman" --- Reading git-diff-tree failed