aboutsummaryrefslogtreecommitdiff
path: root/fs/exec.c
diff options
context:
space:
mode:
authorDaniel Rosenberg <drosen@google.com>2016-10-26 16:27:45 -0700
committerMister Oyster <oysterized@gmail.com>2017-04-13 12:32:14 +0200
commitbe199f96bcc2c4f544429809829d5604896b2952 (patch)
tree22bd9a587bd5bb88e28db0868fa949b7a2b14a40 /fs/exec.c
parent2ab3c55d2515be9019a9df2b67cc2b53e448813a (diff)
vfs: Add permission2 for filesystems with per mount permissions
This allows filesystems to use their mount private data to influence the permssions they return in permission2. It has been separated into a new call to avoid disrupting current permission users. Change-Id: I9d416e3b8b6eca84ef3e336bd2af89ddd51df6ca Signed-off-by: Daniel Rosenberg <drosen@google.com>
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 359a4430d..240a38eeb 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1108,7 +1108,7 @@ EXPORT_SYMBOL(flush_old_exec);
void would_dump(struct linux_binprm *bprm, struct file *file)
{
- if (inode_permission(file_inode(file), MAY_READ) < 0)
+ if (inode_permission2(file->f_path.mnt, file_inode(file), MAY_READ) < 0)
bprm->interp_flags |= BINPRM_FLAGS_ENFORCE_NONDUMP;
}
EXPORT_SYMBOL(would_dump);