Skip to content

Commit

Permalink
Revert "Revert "Revert "ANDROID: vfs: Add permission2 for filesystems…
Browse files Browse the repository at this point in the history
… with per mount permissions"""

This reverts commit cc4acc7.

Android 11 does not need sdcardfs.

Change-Id: I4b5d917da76b91e24c44e8a0ef12b105aa5404f1
Signed-off-by: Jindong <[email protected]>
  • Loading branch information
JDYue committed Sep 24, 2020
1 parent a211d0e commit e554699
Show file tree
Hide file tree
Showing 11 changed files with 72 additions and 168 deletions.
2 changes: 1 addition & 1 deletion fs/attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ int notify_change2(struct vfsmount *mnt, struct dentry * dentry, struct iattr *
return -EPERM;

if (!inode_owner_or_capable(inode)) {
error = inode_permission2(mnt, inode, MAY_WRITE);
error = inode_permission(inode, MAY_WRITE);
if (error)
return error;
}
Expand Down
2 changes: 1 addition & 1 deletion fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1315,7 +1315,7 @@ EXPORT_SYMBOL(flush_old_exec);
void would_dump(struct linux_binprm *bprm, struct file *file)
{
struct inode *inode = file_inode(file);
if (inode_permission2(file->f_path.mnt, inode, MAY_READ) < 0) {
if (inode_permission(inode, MAY_READ) < 0) {
struct user_namespace *old, *user_ns;
bprm->interp_flags |= BINPRM_FLAGS_ENFORCE_NONDUMP;

Expand Down
Loading

0 comments on commit e554699

Please sign in to comment.