summaryrefslogtreecommitdiffstats
path: root/fs/open.c
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2006-09-29 10:59:35 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-29 18:18:08 +0200
commit650a898342b3fa21c392c06a2b7010fa19823efa (patch)
treee5fc9b3c9590ac82b49755535e1de5e56d2dd6e8 /fs/open.c
parent[PATCH] fuse: use dentry in statfs (diff)
downloadlinux-650a898342b3fa21c392c06a2b7010fa19823efa.tar.xz
linux-650a898342b3fa21c392c06a2b7010fa19823efa.zip
[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 <miklos@szeredi.hu> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/open.c')
-rw-r--r--fs/open.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/open.c b/fs/open.c
index 303f06d2a7b9..1574d8fe4909 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -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;