The other night I was trying to find the code where FUSE [dis]allowed other users to access files, but I couldn't remember where it was. Found it in fs/fuse/dir.c, /* ... * 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. */ static int fuse_allow_task(struct fuse_conn *fc, struct task_struct *task) { if (fc->flags & FUSE_ALLOW_OTHER) return 1; if (task->euid == fc->user_id && task->suid == fc->user_id && task->uid == fc->user_id && task->egid == fc->group_id && task->sgid == fc->group_id && task->gid == fc->group_id) return 1; return 0; } The FUSE_ALLOW_OTHER flag is set when you invoke a fuse program like sshfs with "-o allow_other". -Jamie
participants (1)
-
Jamie Guinan