[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:
Miklos Szeredi 2006-09-29 01:59:35 -07:00 • committed by Linus Torvalds
commit 650a898342
3 changed files with 4 additions and 2 deletions

View file

@ -546,7 +546,8 @@ asmlinkage long sys_chdir(const char __user * filename)
struct nameidata nd;
int error;
error = __user_walk(filename, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, &nd);
error = __user_walk(filename,
LOOKUP_FOLLOW|LOOKUP_DIRECTORY|LOOKUP_CHDIR, &nd);
if (error)
goto out;