Skip to content

Commit f744ea0

Browse files
drosen-googlemikeNG
authored andcommitted
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>
1 parent 934abce commit f744ea0

10 files changed

Lines changed: 166 additions & 73 deletions

File tree

fs/exec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,7 @@ EXPORT_SYMBOL(flush_old_exec);
11071107

11081108
void would_dump(struct linux_binprm *bprm, struct file *file)
11091109
{
1110-
if (inode_permission(file_inode(file), MAY_READ) < 0)
1110+
if (inode_permission2(file->f_path.mnt, file_inode(file), MAY_READ) < 0)
11111111
bprm->interp_flags |= BINPRM_FLAGS_ENFORCE_NONDUMP;
11121112
}
11131113
EXPORT_SYMBOL(would_dump);

0 commit comments

Comments
 (0)