diff options
Diffstat (limited to 'fs/exec.c')
| -rw-r--r-- | fs/exec.c | 8 |
1 files changed, 0 insertions, 8 deletions
| @@ -486,8 +486,6 @@ struct file *open_exec(const char *name) | |||
| 486 | if (!(nd.mnt->mnt_flags & MNT_NOEXEC) && | 486 | if (!(nd.mnt->mnt_flags & MNT_NOEXEC) && |
| 487 | S_ISREG(inode->i_mode)) { | 487 | S_ISREG(inode->i_mode)) { |
| 488 | int err = vfs_permission(&nd, MAY_EXEC); | 488 | int err = vfs_permission(&nd, MAY_EXEC); |
| 489 | if (!err && !(inode->i_mode & 0111)) | ||
| 490 | err = -EACCES; | ||
| 491 | file = ERR_PTR(err); | 489 | file = ERR_PTR(err); |
| 492 | if (!err) { | 490 | if (!err) { |
| 493 | file = nameidata_to_filp(&nd, O_RDONLY); | 491 | file = nameidata_to_filp(&nd, O_RDONLY); |
| @@ -922,12 +920,6 @@ int prepare_binprm(struct linux_binprm *bprm) | |||
| 922 | int retval; | 920 | int retval; |
| 923 | 921 | ||
| 924 | mode = inode->i_mode; | 922 | mode = inode->i_mode; |
| 925 | /* | ||
| 926 | * Check execute perms again - if the caller has CAP_DAC_OVERRIDE, | ||
| 927 | * generic_permission lets a non-executable through | ||
| 928 | */ | ||
| 929 | if (!(mode & 0111)) /* with at least _one_ execute bit set */ | ||
| 930 | return -EACCES; | ||
| 931 | if (bprm->file->f_op == NULL) | 923 | if (bprm->file->f_op == NULL) |
| 932 | return -EACCES; | 924 | return -EACCES; |
| 933 | 925 | ||
