diff options
Diffstat (limited to 'fs/binfmt_misc.c')
-rw-r--r-- | fs/binfmt_misc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c index 1befe2ec8186..ba1a1ae4a18a 100644 --- a/fs/binfmt_misc.c +++ b/fs/binfmt_misc.c | |||
@@ -149,8 +149,7 @@ static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs) | |||
149 | 149 | ||
150 | /* if the binary is not readable than enforce mm->dumpable=0 | 150 | /* if the binary is not readable than enforce mm->dumpable=0 |
151 | regardless of the interpreter's permissions */ | 151 | regardless of the interpreter's permissions */ |
152 | if (file_permission(bprm->file, MAY_READ)) | 152 | would_dump(bprm, bprm->file); |
153 | bprm->interp_flags |= BINPRM_FLAGS_ENFORCE_NONDUMP; | ||
154 | 153 | ||
155 | allow_write_access(bprm->file); | 154 | allow_write_access(bprm->file); |
156 | bprm->file = NULL; | 155 | bprm->file = NULL; |