diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 6e5320bef264..bbf20a35fc00 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -1105,7 +1105,7 @@ int fuse_allow_current_process(struct fuse_conn *fc) const struct cred *cred; if (fc->allow_other) - return 1; + return current_in_userns(fc->user_ns); cred = current_cred(); if (uid_eq(cred->euid, fc->user_id) && diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c index ed80a88980f0..6e0e164492c0 100644 --- a/kernel/user_namespace.c +++ b/kernel/user_namespace.c @@ -998,6 +998,7 @@ bool current_in_userns(const struct user_namespace *target_ns) { return in_userns(target_ns, current_user_ns()); } +EXPORT_SYMBOL(current_in_userns); static inline struct user_namespace *to_user_ns(struct ns_common *ns) {