Skip to content

Commit

Permalink
vfs: Add permission2 for filesystems with per mount permissions
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
drosen-google authored and jrior001 committed Mar 5, 2017
1 parent 4756af5 commit d2f3072
Show file tree
Hide file tree
Showing 10 changed files with 166 additions and 73 deletions.
2 changes: 1 addition & 1 deletion fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,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);
Expand Down
Loading

0 comments on commit d2f3072

Please sign in to comment.