ANDROID: overlayfs: inode_owner_or_capable called during execv
Using old_creds as an indication that we are not overriding the credentials, bypass call to inode_owner_or_capable. This solves a problem with all execv calls being blocked when using the caller's credentials. Bug: 297913716 Link: https://lore.kernel.org/lkml/20201021151903.652827-5-salyzyn@android.com/ Change-Id: I1ae009a33a55da7404033e574c8873b079c795be Signed-off-by: David Anderson <dvander@google.com> Signed-off-by: Mark Salyzyn <salyzyn@android.com> Signed-off-by: Daniel Roseberg <drosen@google.com> Test: adb-remount-test.sh
This commit is contained in:
committed by
Daniel Rosenberg
parent
ad8f22c703
commit
9b4ff1899e
+2
-1
@@ -60,7 +60,8 @@ static struct file *ovl_open_realfile(const struct file *file,
|
||||
if (err) {
|
||||
realfile = ERR_PTR(err);
|
||||
} else {
|
||||
if (!inode_owner_or_capable(real_idmap, realinode))
|
||||
if (old_cred && !inode_owner_or_capable(real_idmap,
|
||||
realinode))
|
||||
flags &= ~O_NOATIME;
|
||||
|
||||
realfile = backing_file_open(&file->f_path, flags, realpath,
|
||||
|
||||
Reference in New Issue
Block a user