mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
ANDROID: 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>
This commit is contained in:
committed by
Dmitry Shmidt
parent
2757e9bdf4
commit
bbcd0ffae5
@@ -1275,7 +1275,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);
|
||||
|
||||
Reference in New Issue
Block a user