From 8bb79224b87aab92071e94d46e70bd160d89bf34 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Wed, 16 Jul 2008 09:51:03 -0400 Subject: [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 --- fs/namei.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'fs/namei.c') 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; } -- cgit v1.2.3-59-g8ed1b