Seth Forshee reported a mount regression in nfs autmounts
with "fs: Add user namespace member to struct super_block".
It turns out that the assumption that current->cred is something
reasonable during mount while necessary to improve support of
unprivileged mounts is wrong in the automount path.
To fix the existing filesystems override current->cred with the
init_cred before calling d_automount and restore current->cred after
d_automount completes.
To support unprivileged mounts would require a more nuanced cred
selection, so fail on unprivileged mounts for the time being. As none
of the filesystems that currently set FS_USERNS_MOUNT implement
d_automount this check is only good for preventing future problems.
Fixes: 6e4eab577a0c ("fs: Add user namespace member to struct super_block")
Tested-by: Seth Forshee <email address hidden>
Signed-off-by: "Eric W. Biederman" <email address hidden>
(backported from commit aeaa4a79ff6a5ed912b7362f206cf8576fca538b)
Signed-off-by: Seth Forshee <email address hidden>
Acked-by: Stefan Bader <email address hidden>
Acked-by: Colin King <email address hidden>
Acked-by: Brad Figg <email address hidden>
Signed-off-by: Tim Gardner <email address hidden>
UBUNTU: SAUCE: overlayfs: fix regression in whiteout detection
The Ubuntu backport of the below commit necessarily had to follow the
changes to is_ovl_whiteout. In the process the wrong dentry was passed
preventing correct detection of legacy whitouts in a rename over a
whitout on some upper filesystem types (at least ramfs):