exist. So if permissions are revoked this won't be
noticed immediately, only after the attribute
timeout has expired */
- } else if (mask & (MAY_ACCESS | MAY_CHDIR)) {
+ } else if (mask & MAY_ACCESS) {
err = fuse_access(inode, mask);
} else if ((mask & MAY_EXEC) && S_ISREG(inode->i_mode)) {
if (!(inode->i_mode & S_IXUGO)) {
old_cap = cap_set_effective(current->cap_permitted);
}
- res = __user_walk_fd(dfd, filename, LOOKUP_FOLLOW|LOOKUP_ACCESS, &nd);
+ res = __user_walk_fd(dfd, filename, LOOKUP_FOLLOW, &nd);
if (res)
goto out;
- res = vfs_permission(&nd, mode);
+ res = vfs_permission(&nd, mode | MAY_ACCESS);
/* SuS v2 requires we report a read only fs too */
if(res || !(mode & S_IWOTH) ||
special_file(nd.path.dentry->d_inode->i_mode))
if (error)
goto out;
- error = vfs_permission(&nd, MAY_EXEC | MAY_CHDIR);
+ error = vfs_permission(&nd, MAY_EXEC | MAY_ACCESS);
if (error)
goto dput_and_out;
if (!S_ISDIR(inode->i_mode))
goto out_putf;
- error = file_permission(file, MAY_EXEC);
+ error = file_permission(file, MAY_EXEC | MAY_ACCESS);
if (!error)
set_fs_pwd(current->fs, &file->f_path);
out_putf:
if (error)
goto out;
- error = vfs_permission(&nd, MAY_EXEC);
+ error = vfs_permission(&nd, MAY_EXEC | MAY_ACCESS);
if (error)
goto dput_and_out;
*/
#define LOOKUP_OPEN (0x0100)
#define LOOKUP_CREATE (0x0200)
-#define LOOKUP_ACCESS (0x0400)
extern int __user_walk(const char __user *, unsigned, struct nameidata *);
extern int __user_walk_fd(int dfd, const char __user *, unsigned, struct nameidata *);