]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - fs/binfmt_misc.c
consolidate BINPRM_FLAGS_ENFORCE_NONDUMP handling
[mirror_ubuntu-artful-kernel.git] / fs / binfmt_misc.c
index 1befe2ec8186768a7b7baebc4a4c4d20418cfc14..ba1a1ae4a18a52c714ae82281e3c1f39fbfae02a 100644 (file)
@@ -149,8 +149,7 @@ static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs)
 
                /* if the binary is not readable than enforce mm->dumpable=0
                   regardless of the interpreter's permissions */
-               if (file_permission(bprm->file, MAY_READ))
-                       bprm->interp_flags |= BINPRM_FLAGS_ENFORCE_NONDUMP;
+               would_dump(bprm, bprm->file);
 
                allow_write_access(bprm->file);
                bprm->file = NULL;