/* For this reason only those processes can call into the filesystem, for which the owner of the mount has ptrace privilege. This excludes processes started by other users, suid or sgid processes.  */
int fuse_allow_task(struct fuse_conn *fc, struct task_struct *task)
/* For this reason only those processes can call into the filesystem, for which the owner of the mount has ptrace privilege. This excludes processes started by other users, suid or sgid processes.  */
int fuse_allow_task(struct fuse_conn *fc, struct task_struct *task)
{
	const struct cred *cred;
	int ret;
	if (fc->flags & FUSE_ALLOW_OTHER)
		return 1;
	rcu_read_lock();
	ret = 0;
	cred = __task_cred(task);
	if (cred->euid == fc->user_id &&
	    cred->suid == fc->user_id &&
	    cred->uid  == fc->user_id &&
	    cred->egid == fc->group_id &&
	    cred->sgid == fc->group_id &&
	    cred->gid  == fc->group_id)
		ret = 1;
	rcu_read_unlock();
	return ret;
}