diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-07-16 09:51:03 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-07-26 20:53:19 -0400 |
commit | 8bb79224b87aab92071e94d46e70bd160d89bf34 (patch) | |
tree | dab47cbb434876e5916f18b738ef8bd3fe1e1ce1 /fs/namei.c | |
parent | db2e747b14991a4c6a5c98b0e5f552a193237c03 (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.c | 2 |
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; } |