diff options
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -118,7 +118,7 @@ asmlinkage long sys_uselib(const char __user * library) | |||
118 | if (!S_ISREG(nd.path.dentry->d_inode->i_mode)) | 118 | if (!S_ISREG(nd.path.dentry->d_inode->i_mode)) |
119 | goto exit; | 119 | goto exit; |
120 | 120 | ||
121 | error = vfs_permission(&nd, MAY_READ | MAY_EXEC); | 121 | error = vfs_permission(&nd, MAY_READ | MAY_EXEC | MAY_OPEN); |
122 | if (error) | 122 | if (error) |
123 | goto exit; | 123 | goto exit; |
124 | 124 | ||
@@ -666,7 +666,7 @@ struct file *open_exec(const char *name) | |||
666 | struct inode *inode = nd.path.dentry->d_inode; | 666 | struct inode *inode = nd.path.dentry->d_inode; |
667 | file = ERR_PTR(-EACCES); | 667 | file = ERR_PTR(-EACCES); |
668 | if (S_ISREG(inode->i_mode)) { | 668 | if (S_ISREG(inode->i_mode)) { |
669 | int err = vfs_permission(&nd, MAY_EXEC); | 669 | int err = vfs_permission(&nd, MAY_EXEC | MAY_OPEN); |
670 | file = ERR_PTR(err); | 670 | file = ERR_PTR(err); |
671 | if (!err) { | 671 | if (!err) { |
672 | file = nameidata_to_filp(&nd, | 672 | file = nameidata_to_filp(&nd, |