Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106361
b: refs/heads/master
c: 8bb7922
h: refs/heads/master
i:
  106359: 3073a33
v: v3
  • Loading branch information
Al Viro committed Jul 27, 2008
1 parent 56c88cb commit a906d35
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: db2e747b14991a4c6a5c98b0e5f552a193237c03
refs/heads/master: 8bb79224b87aab92071e94d46e70bd160d89bf34
2 changes: 0 additions & 2 deletions trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
5 changes: 2 additions & 3 deletions trunk/fs/open.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,12 +501,11 @@ asmlinkage long sys_chdir(const char __user * filename)
struct nameidata nd;
int error;

error = __user_walk(filename,
LOOKUP_FOLLOW|LOOKUP_DIRECTORY|LOOKUP_CHDIR, &nd);
error = __user_walk(filename, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, &nd);
if (error)
goto out;

error = vfs_permission(&nd, MAY_EXEC);
error = vfs_permission(&nd, MAY_EXEC | MAY_CHDIR);
if (error)
goto dput_and_out;

Expand Down
1 change: 0 additions & 1 deletion trunk/include/linux/namei.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND};
#define LOOKUP_OPEN (0x0100)
#define LOOKUP_CREATE (0x0200)
#define LOOKUP_ACCESS (0x0400)
#define LOOKUP_CHDIR (0x0800)

extern int __user_walk(const char __user *, unsigned, struct nameidata *);
extern int __user_walk_fd(int dfd, const char __user *, unsigned, struct nameidata *);
Expand Down

0 comments on commit a906d35

Please sign in to comment.