mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[PATCH] vfs: define new lookup flag for chdir
In the "operation does permission checking" model used by fuse, chdir permission is not checked, since there's no chdir method. For this case set a lookup flag, which will be passed to ->permission(), so fuse can distinguish it from permission checks for other operations. Signed-off-by: Miklos Szeredi <[email protected]> Cc: Al Viro <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
5b35e8e58a
commit
650a898342
3 changed files with 4 additions and 2 deletions
|
|
@ -776,7 +776,7 @@ static int fuse_permission(struct inode *inode, int mask, struct nameidata *nd)
|
|||
if ((mask & MAY_EXEC) && !S_ISDIR(mode) && !(mode & S_IXUGO))
|
||||
return -EACCES;
|
||||
|
||||
if (nd && (nd->flags & LOOKUP_ACCESS))
|
||||
if (nd && (nd->flags & (LOOKUP_ACCESS | LOOKUP_CHDIR)))
|
||||
return fuse_access(inode, mask);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue