diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-08-22 20:06:03 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-08-24 15:55:06 -0400 |
commit | 9167b0b9a0ab7907191523f5a0528e3b9c288e21 (patch) | |
tree | 63345d9bacaf1b30e977a5cd24322d2426f6109f /fs/exec.c | |
parent | a343bb7750e6a098909c34f5c5dfddbc4fa40053 (diff) |
VFS: Remove redundant open-coded mode bit check in prepare_binfmt().
The check in prepare_binfmt() for inode->i_mode & 0111 is redundant,
since open_exec() will already have done that.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
(cherry picked from 822dec482ced07af32c378cd936d77345786572b commit)
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 6 |
1 files changed, 0 insertions, 6 deletions
@@ -922,12 +922,6 @@ int prepare_binprm(struct linux_binprm *bprm) | |||
922 | int retval; | 922 | int retval; |
923 | 923 | ||
924 | mode = inode->i_mode; | 924 | 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) | 925 | if (bprm->file->f_op == NULL) |
932 | return -EACCES; | 926 | return -EACCES; |
933 | 927 | ||