summaryrefslogtreecommitdiff
path: root/fs/namei.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-07-16 09:51:03 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2008-07-26 20:53:19 -0400
commit8bb79224b87aab92071e94d46e70bd160d89bf34 (patch)
treedab47cbb434876e5916f18b738ef8bd3fe1e1ce1 /fs/namei.c
parentdb2e747b14991a4c6a5c98b0e5f552a193237c03 (diff)
[PATCH] permission checks for chdir need special treatment only on the last step
... so we ought to pass MAY_CHDIR to vfs_permission() instead of having it triggered on every step of preceding pathname resolution. LOOKUP_CHDIR is killed by that. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c
index ae0e56fdb742..6c76e1ee9c45 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -268,8 +268,6 @@ int permission(struct inode *inode, int mask, struct nameidata *nd)
if (nd) {
if (nd->flags & LOOKUP_ACCESS)
extra |= MAY_ACCESS;
- if (nd->flags & LOOKUP_CHDIR)
- extra |= MAY_CHDIR;
if (nd->flags & LOOKUP_OPEN)
extra |= MAY_OPEN;
}