aboutsummaryrefslogtreecommitdiffstats
path: root/fs/binfmt_elf_fdpic.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/binfmt_elf_fdpic.c')
-rw-r--r--fs/binfmt_elf_fdpic.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c
index 6e6d4568d548..a4d933a51208 100644
--- a/fs/binfmt_elf_fdpic.c
+++ b/fs/binfmt_elf_fdpic.c
@@ -234,6 +234,14 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm,
234 goto error; 234 goto error;
235 } 235 }
236 236
237 /*
238 * If the binary is not readable then enforce
239 * mm->dumpable = 0 regardless of the interpreter's
240 * permissions.
241 */
242 if (file_permission(interpreter, MAY_READ) < 0)
243 bprm->interp_flags |= BINPRM_FLAGS_ENFORCE_NONDUMP;
244
237 retval = kernel_read(interpreter, 0, bprm->buf, 245 retval = kernel_read(interpreter, 0, bprm->buf,
238 BINPRM_BUF_SIZE); 246 BINPRM_BUF_SIZE);
239 if (retval < 0) 247 if (retval < 0)