mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
ANDROID: overlayfs: readdir override_creds=off option bypass creator_cred
ovl_revert_creds calls missing. Addendum to commit6120a4d780("FROMLIST: overlayfs: override_creds=off option bypass creator_cred") Signed-off-by: Mark Salyzyn <salyzyn@google.com> Bug: 169988379 Fixes:48bd024b8a("ovl: switch to mounter creds in readdir") Change-Id: Ib351a453cca7fb5a2d87c60212f4ab0a420deb98
This commit is contained in:
@@ -795,7 +795,7 @@ static int ovl_iterate(struct file *file, struct dir_context *ctx)
|
||||
}
|
||||
err = 0;
|
||||
out:
|
||||
revert_creds(old_cred);
|
||||
ovl_revert_creds(dentry->d_sb, old_cred);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -847,7 +847,7 @@ static struct file *ovl_dir_open_realfile(struct file *file,
|
||||
|
||||
old_cred = ovl_override_creds(file_inode(file)->i_sb);
|
||||
res = ovl_path_open(realpath, O_RDONLY | (file->f_flags & O_LARGEFILE));
|
||||
revert_creds(old_cred);
|
||||
ovl_revert_creds(file_inode(file)->i_sb, old_cred);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user