summaryrefslogtreecommitdiff
path: root/kernel/trace/trace.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2016-07-23 11:20:44 -0500
committerBruno Martins <bgcngm@gmail.com>2022-10-28 15:39:29 +0100
commit7903280ee07aa58074ba6ec9ef4e55c25e86bfea (patch)
treea1b2adabe051793fec2bb396cdfda875a1ef91de /kernel/trace/trace.c
parentb87fb50ff1cd523e48681d3f0715619d90150b6f (diff)
fs: Call d_automount with the filesystems creds
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 <seth.forshee@canonical.com> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Change-Id: I972485e9da3f2883e4ec9b38da3374e0993b1af6
Diffstat (limited to 'kernel/trace/trace.c')
0 files changed, 0 insertions, 0 deletions