]> git.baikalelectronics.ru Git - kernel.git/commit
legacy_get_tree(): pass fc->user_ns to mount_capable()
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 12 May 2019 21:23:30 +0000 (17:23 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 25 May 2019 21:59:58 +0000 (17:59 -0400)
commitd665d0577114d97a3c5a030cd00f96e895c3eaae
treef9c4204ac11ce422bfc33475b202544e0b0fcc9f
parentf36693b0d34f55b9762045f6ca8d10874acaa6e1
legacy_get_tree(): pass fc->user_ns to mount_capable()

guaranteed to be equal to current_user_ns() here - it has not
been changed since alloc_fs_context() (nothing in legacy
methods changes it) and since we don't have SB_SUBMOUNT,
that must've been FS_CONTEXT_FOR_MOUNT.  And in that case
we have fc->user_ns set to fc->cred->user_ns, i.e.
current_cred()->user_ns, i.e. current_user_ns()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/fs_context.c