consolidate BINPRM_FLAGS_ENFORCE_NONDUMP handling
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 19 Jun 2011 16:49:47 +0000 (12:49 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 20 Jul 2011 05:43:10 +0000 (01:43 -0400)
new helper: would_dump(bprm, file).  Checks if we are allowed to
read the file and if we are not - sets ENFORCE_NODUMP.  Exported,
used in places that previously open-coded the same logics.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/binfmt_elf.c
fs/binfmt_elf_fdpic.c
fs/binfmt_misc.c
fs/exec.c
include/linux/binfmts.h

diff --cc fs/binfmt_elf.c
Simple merge
Simple merge
Simple merge
diff --cc fs/exec.c
Simple merge
Simple merge